{"record":{"id":"5db3364b9d48cd32","repo":"golang/go","slug":"no-sprotocol-found-for-repository","errorCode":null,"errorMessage":"no %sprotocol found for repository","messagePattern":"no (.+?)protocol found for repository","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cmd/go/internal/vcs/vcs.go","lineNumber":905,"sourceCode":"\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// If we know how to ping URL schemes for this VCS,\n\t\t\t\t\t\t// check that this repo works.\n\t\t\t\t\t\t// Otherwise, default to the first scheme\n\t\t\t\t\t\t// that meets the requested security level.\n\t\t\t\t\t\tif vcs.PingCmd == \"\" {\n\t\t\t\t\t\t\treturn s, nil\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif err := vcs.Ping(s, repo); err == nil {\n\t\t\t\t\t\t\treturn s, nil\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tsecurityFrag := \"\"\n\t\t\t\t\tif security == web.SecureOnly {\n\t\t\t\t\t\tsecurityFrag = \"secure \"\n\t\t\t\t\t}\n\t\t\t\t\treturn \"\", fmt.Errorf(\"no %sprotocol found for repository\", securityFrag)\n\t\t\t\t}()\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\trepoURL = scheme + \"://\" + repo\n\t\t\t}\n\t\t}\n\t\trr := &RepoRoot{\n\t\t\tRepo: repoURL,\n\t\t\tRoot: match[\"root\"],\n\t\t\tVCS:  vcs,\n\t\t}\n\t\treturn rr, nil\n\t}\n\treturn nil, errUnknownSite\n}\n\nfunc interceptVCSTest(repo string, vcs *Cmd, security web.SecurityMode) (repoURL string, ok bool) {","sourceCodeStart":887,"sourceCodeEnd":923,"githubUrl":"https://github.com/golang/go/blob/b6b368adc57c96c3151d224d172029f233ead2c3/src/cmd/go/internal/vcs/vcs.go#L887-L923","documentation":"For schemeless repository URLs (typically from vanity import paths), the go tool iterates each transport scheme the VCS supports (https, http, git, ssh), filtered by the requested security level. If no scheme responds successfully to a PingCmd probe (or the VCS has no PingCmd and none of the schemes succeed downstream), this error is returned.","triggerScenarios":"A vanity import path resolves to a repository that is unreachable over all supported transport protocols — wrong hostname, dead server, firewall blocking https/git/ssh, or a repository that has moved.","commonSituations":"Dead or moved repository URL; typo in the vanity path's go-import meta tag; firewall/proxy blocking git:// or ssh:// protocols; server temporarily down; HTTPS certificate issues causing ping failures.","solutions":["Test connectivity: `curl -v https://<repo-host>` and `git ls-remote <repo-url>`","Check the go-import meta tag for the correct repository URL","If behind a corporate proxy, ensure HTTPS and git protocols are allowed","Try GOINSECURE if the issue is a self-signed certificate (development only)","Use a replace directive to point at a working mirror"],"exampleFix":"# before: repository unreachable over all protocols\ngo get example.com/pkg\n\n# after: diagnose with git directly\ngit ls-remote https://github.com/me/pkg\n# then fix the vanity meta tag or use replace:\n# go.mod: replace example.com/pkg => github.com/me/pkg v1.0.0","handlingStrategy":"retry","validationCode":"# Pre-check repository reachability before go get\nREPO_URL=$(curl -sL \"https://$IMPORT_PATH?go-get=1\" | grep -oP 'go-import\" content=\"[^\"]+\"' | awk '{print $4}' | tr -d '\"')\nif [ -n \"$REPO_URL\" ]; then\n  if ! git ls-remote \"$REPO_URL\" >/dev/null 2>&1; then\n    echo \"WARNING: repository unreachable: $REPO_URL\"\n  fi\nfi","typeGuard":null,"tryCatchPattern":"# Retry with GOINSECURE or suggest network diagnostics\nERR=$(go get $IMPORT_PATH 2>&1)\nif echo \"$ERR\" | grep -q 'no .*protocol found for repository'; then\n  echo 'Repository unreachable over all protocols.'\n  echo 'Check: network, DNS, firewall, and the go-import meta tag URL.'\n  echo 'Retry with GOINSECURE for self-signed certs (dev only):'\n  echo '  GOINSECURE=* go get $IMPORT_PATH'\nfi","preventionTips":["Verify repository URLs in go-import meta tags are correct and reachable","Ensure firewalls/proxies allow HTTPS and git protocols in CI","Use replace directives for repositories with known connectivity issues","Test with `git ls-remote` before scripting `go get`"],"tags":["vcs","network","connectivity","discovery"],"analyzedSha":"b6b368adc57c96c3151d224d172029f233ead2c3","analyzedAt":"2026-08-12T00:22:02.250Z","schemaVersion":2},"datasetVersion":"2026-08-12T12:17:08.281Z"}