{"record":{"id":"2326ee926e072483","repo":"golang/go","slug":"s-invalid-repo-root-q-v","errorCode":null,"errorMessage":"%s: invalid repo root %q: %v","messagePattern":"(.+?): invalid repo root %q: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cmd/go/internal/vcs/vcs.go","lineNumber":1054,"sourceCode":"\t\t\tlog.Printf(\"get %q: verifying non-authoritative meta tag\", importPath)\n\t\t}\n\t\tvar imports []metaImport\n\t\turl, imports, err = metaImportsForPrefix(mmi.Prefix, mod, security)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tmetaImport2, err := matchGoImport(imports, importPath)\n\t\tif err != nil || mmi != metaImport2 {\n\t\t\treturn nil, fmt.Errorf(\"%s and %s disagree about go-import for %s\", resp.URL, url, mmi.Prefix)\n\t\t}\n\t}\n\n\tif err := validateRepoSubDir(mmi.SubDir); err != nil {\n\t\treturn nil, fmt.Errorf(\"%s: invalid subdirectory %q: %v\", resp.URL, mmi.SubDir, err)\n\t}\n\n\tif err := validateRepoRoot(mmi.RepoRoot); err != nil {\n\t\treturn nil, fmt.Errorf(\"%s: invalid repo root %q: %v\", resp.URL, mmi.RepoRoot, err)\n\t}\n\tvar vcs *Cmd\n\tif mmi.VCS == \"mod\" {\n\t\tvcs = vcsMod\n\t} else {\n\t\tvcs = vcsByCmd(mmi.VCS)\n\t\tif vcs == nil {\n\t\t\treturn nil, fmt.Errorf(\"%s: unknown vcs %q\", resp.URL, mmi.VCS)\n\t\t}\n\t}\n\n\tif err := checkGOVCS(vcs, mmi.Prefix); err != nil {\n\t\treturn nil, err\n\t}\n\n\trepoURL, ok := interceptVCSTest(mmi.RepoRoot, vcs, security)\n\tif !ok {\n\t\trepoURL = mmi.RepoRoot","sourceCodeStart":1036,"sourceCodeEnd":1072,"githubUrl":"https://github.com/golang/go/blob/b6b368adc57c96c3151d224d172029f233ead2c3/src/cmd/go/internal/vcs/vcs.go#L1036-L1072","documentation":"validateRepoRoot rejected the RepoRoot field of the matched meta import. The validator requires a URL that parses, has a non-empty scheme, and whose scheme is not 'file'. The %s is resp.URL, %q is the repo root URL, %v is the validator's error (parse error, 'no scheme', or 'file scheme disallowed').","triggerScenarios":"The go-import meta tag's RepoRoot is missing a scheme, uses 'file://', is unparseable, or uses an unsupported form like 'git@host:path'.","commonSituations":"Vanity server emitting 'git@github.com:org/repo' (SCP-like, no scheme) or a relative URL into the repo-root field.","solutions":["Ensure RepoRoot is a fully-qualified URL with a supported scheme (https://, http://, git://, ssh://)","Re-publish the meta tag with a canonical https:// repo root"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Validate a repo root URL the same way cmd/go does\nfunc validRepoRoot(s string) error {\n  u, err := url.Parse(s)\n  if err != nil { return err }\n  if u.Scheme == \"\" { return errors.New(\"no scheme\") }\n  if u.Scheme == \"file\" { return errors.New(\"file scheme disallowed\") }\n  return nil\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always include a scheme (https://) in the go-import repo-root field","Avoid SCP-like 'git@host:path' syntax; use ssh://host/path instead"],"tags":["go","modules","vcs","vanity"],"backgroundTag":null,"analyzedSha":"b6b368adc57c96c3151d224d172029f233ead2c3","analyzedAt":"2026-08-12T00:22:02.250Z","schemaVersion":2},"datasetVersion":"2026-08-13T09:17:06.757Z"}