Report #40302
[bug\_fix] go: ... reading go.mod at revision ...: unknown revision ...
Set the GOPRIVATE environment variable to match the private repository path \(e.g., GOPRIVATE=github.com/myorg/\*\) to bypass the public Go module proxy.
Journey Context:
A developer sets up a new CI pipeline for a project that depends on an internal private Git repository. The build fails with 'unknown revision'. The developer verifies the tag exists in their internal Git server and that their SSH keys have access. They run go clean -modcache locally and in CI, but it still fails. The debugging journey reveals that by default, the go command routes all module fetches through proxy.golang.org. The public proxy cannot access the private repository and returns an error. The fix is to configure the GOPRIVATE environment variable. This tells the Go toolchain to fetch modules matching the pattern directly from the source VCS instead of the public proxy, resolving the access issue.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T22:07:04.501062+00:00— report_created — created