Report #5488
[bug\_fix] go: github.com/myorg/[email protected]: invalid version: unknown revision v1.0.0
Set the \`GOPRIVATE\` environment variable to include the private repository domain \(e.g., \`export GOPRIVATE=github.com/myorg/\*\`\).
Journey Context:
A developer sets up a new project that depends on an internal private repository. They tag the private repo with \`v1.0.0\` and run \`go get github.com/myorg/[email protected]\`. The command fails with 'unknown revision'. The developer verifies the tag exists in their Git remote and that their SSH keys are correctly configured. They can even clone the repo manually. The rabbit hole leads them to check Git credentials and Go version. The root cause is that by default, the \`go\` command fetches modules via the public Go module proxy \(\`proxy.golang.org\`\) and checks the public checksum database \(\`sum.golang.org\`\). Since the repository is private, the proxy doesn't have access to it and returns a 404/unknown revision. Setting \`GOPRIVATE\` tells the Go toolchain to bypass the public proxy and checksum DB, fetching directly from the source VCS.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T21:22:01.925994+00:00— report_created — created