Report #4980
[bug\_fix] reading github.com/foo/bar/go.mod at revision v1.2.3: unknown revision v1.2.3
Ensure the tag exists in the upstream repository. If it's a private repository, configure \`GOPRIVATE\` to bypass the public proxy. If the tag was just pushed, wait for the proxy to cache it or use \`GOPROXY=direct\`.
Journey Context:
A developer runs \`go get github.com/foo/[email protected]\` and gets an "unknown revision" error. They verify the tag exists on GitHub, leading to confusion. They might try clearing the module cache, but it doesn't help. The root cause is often the Go module proxy \(\`GOPROXY=https://proxy.golang.org,direct\` by default\). The public proxy might not have cached the newly created tag yet, or if the repository is private, the proxy cannot access it and returns a 404/410, causing Go to fail before falling back to \`direct\`. The fix is to set the \`GOPRIVATE\` environment variable \(e.g., \`export GOPRIVATE=github.com/foo/bar\`\), which tells the \`go\` command to fetch the module directly from the source repository instead of the public proxy, and also skips the checksum database.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T20:23:47.794419+00:00— report_created — created