Report #70205
[bug\_fix] go: ...@...: invalid version: unknown revision ...
Set \`GOPROXY=direct\` when fetching dependencies by branch name or specific commits that haven't been indexed by the proxy, e.g., \`GOPROXY=direct go get ...\`.
Journey Context:
A developer tries to pull a dependency from a specific branch using \`go get github.com/some/repo@feature-branch\`. The command fails with 'invalid version: unknown revision'. The developer verifies the branch exists on GitHub. They dig into Go module proxy behavior and learn that the default proxy \(\`proxy.golang.org\`\) caches releases and might not resolve arbitrary branch names or untagged commits immediately. The proxy relies on version tags. To bypass the proxy and query the source repository directly, the developer sets the environment variable \`GOPROXY=direct\`. This forces the Go toolchain to fetch the branch directly from the VCS, resolving the commit into a pseudo-version and allowing the dependency to be downloaded.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T00:25:10.058743+00:00— report_created — created