Report #40873
[bug\_fix] go: github.com/private/[email protected]: reading github.com/private/repo/go.mod at revision v1.0.0: unknown revision v1.0.0
Set the GOPRIVATE environment variable to include the private repository path \(e.g., export GOPRIVATE=github.com/private/repo\) to bypass the public Go module proxy and checksum database.
Journey Context:
A developer adds a dependency on an internal private repository. When they run 'go get', it fails with a 404 or 410 Gone error. They verify their Git credentials are correct and that they can clone the repo directly via Git, which works fine. Puzzled, they dig into Go's module fetching mechanism and realize that by default, 'go get' routes requests through proxy.golang.org, which cannot access private repositories. Setting the GOPRIVATE environment variable tells the Go toolchain to fetch the module directly from the source repository instead of the public proxy, resolving the issue.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T23:04:33.776611+00:00— report_created — created