{"record":{"id":"a6e891c28fb7702f","repo":"golang/go","slug":"unknown-version-control-system-q","errorCode":null,"errorMessage":"unknown version control system %q","messagePattern":"unknown version control system %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cmd/go/internal/vcs/vcs.go","lineNumber":871,"sourceCode":"\t\tfor i, name := range srv.regexp.SubexpNames() {\n\t\t\tif name != \"\" && match[name] == \"\" {\n\t\t\t\tmatch[name] = m[i]\n\t\t\t}\n\t\t}\n\t\tif srv.vcs != \"\" {\n\t\t\tmatch[\"vcs\"] = expand(match, srv.vcs)\n\t\t}\n\t\tif srv.repo != \"\" {\n\t\t\tmatch[\"repo\"] = expand(match, srv.repo)\n\t\t}\n\t\tif srv.check != nil {\n\t\t\tif err := srv.check(match); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t}\n\t\tvcs := vcsByCmd(match[\"vcs\"])\n\t\tif vcs == nil {\n\t\t\treturn nil, fmt.Errorf(\"unknown version control system %q\", match[\"vcs\"])\n\t\t}\n\t\tif err := checkGOVCS(vcs, match[\"root\"]); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tvar repoURL string\n\t\tif !srv.schemelessRepo {\n\t\t\trepoURL = match[\"repo\"]\n\t\t} else {\n\t\t\trepo := match[\"repo\"]\n\t\t\tvar ok bool\n\t\t\trepoURL, ok = interceptVCSTest(repo, vcs, security)\n\t\t\tif !ok {\n\t\t\t\tscheme, err := func() (string, error) {\n\t\t\t\t\tfor _, s := range vcs.Scheme {\n\t\t\t\t\t\tif security == web.SecureOnly && !vcs.isSecureScheme(s) {\n\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t}\n","sourceCodeStart":853,"sourceCodeEnd":889,"githubUrl":"https://github.com/golang/go/blob/b6b368adc57c96c3151d224d172029f233ead2c3/src/cmd/go/internal/vcs/vcs.go#L853-L889","documentation":"When resolving a vanity import path, the go tool reads the `<meta name=\"go-import\">` tag which specifies a VCS type (git, hg, svn, bzr, fossil). vcsByCmd looks up the named VCS in the known list; if the name is not recognized (typo or unsupported system like 'perforce'), the lookup returns nil and this error fires.","triggerScenarios":"A repository's go-import meta tag specifies a VCS name that isn't in the supported set: `<meta name=\"go-import\" content=\"example.com/pkg perforce https://...\">`, or a typo like 'get' instead of 'git'.","commonSituations":"Misconfigured vanity import page with a typo in the VCS field; a hosting service serving an incorrect go-import meta tag; a repository using an unsupported VCS.","solutions":["Check the discovery page: `curl -sL https://<import-path> | grep go-import`","If you control the vanity page, fix the VCS name in the meta tag to one of: git, hg, svn, bzr, fossil","Use a replace directive to point directly at the repository URL","Report the issue to the vanity path maintainer"],"exampleFix":"<!-- before: typo in VCS name -->\n<meta name=\"go-import\" content=\"example.com/pkg get https://github.com/me/pkg\">\n\n<!-- after: correct VCS name -->\n<meta name=\"go-import\" content=\"example.com/pkg git https://github.com/me/pkg\">","handlingStrategy":"try-catch","validationCode":"# Pre-check the go-import meta tag for VCS validity\nSUPPORTED_VCS='git hg svn bzr fossil'\nMETA=$(curl -sL \"https://$IMPORT_PATH?go-get=1\" | grep -oP 'go-import\" content=\"[^\"]+\"' | head -1)\nMETA_VCS=$(echo \"$META\" | awk '{print $3}' | tr -d '\"')\nfor v in $SUPPORTED_VCS; do\n  [ \"$META_VCS\" = \"$v\" ] && echo \"VCS OK: $v\" && exit 0\ndone\necho \"WARNING: unsupported VCS in meta tag: $META_VCS\"","typeGuard":null,"tryCatchPattern":"# Detect unknown VCS error and suggest using a replace directive\nERR=$(go get $IMPORT_PATH 2>&1)\nif echo \"$ERR\" | grep -q 'unknown version control system'; then\n  echo 'The vanity path declares an unsupported VCS.'\n  echo 'Use a replace directive in go.mod to point directly at the repository.'\nfi","preventionTips":["Verify go-import meta tags declare a supported VCS (git, hg, svn, bzr, fossil)","Use replace directives for repos with broken vanity pages","Test vanity import paths with curl before scripting go get"],"tags":["vcs","import-path","discovery","meta-tags"],"analyzedSha":"b6b368adc57c96c3151d224d172029f233ead2c3","analyzedAt":"2026-08-12T00:22:02.250Z","schemaVersion":2},"datasetVersion":"2026-08-12T06:17:24.410Z"}