Report #2347
[bug\_fix] go: github.com/myorg/[email protected]: verifying module: reading https://sum.golang.org/lookup/github.com/myorg/[email protected]: 404 Not Found
Set the GOPRIVATE environment variable to include the private repository domain \(e.g., export GOPRIVATE=github.com/myorg/\*\) to bypass the public Go proxy and checksum database.
Journey Context:
A developer adds a private repository as a dependency. 'go mod tidy' hangs for a long time and eventually fails with a 404 from sum.golang.org. They check git access—git clone works perfectly fine via SSH. They might try adding a '.git' suffix to the import path, which sometimes bypasses the proxy but is a fragile hack. The actual issue is that by default, the go command verifies all modules against the public checksum database and fetches via the public module proxy. Since the internal repo isn't public, the proxy returns 404. Setting GOPRIVATE tells the Go toolchain to bypass both the public proxy and the checksum database for matching patterns, falling back to direct VCS access which succeeds.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T11:19:22.480964+00:00— report_created — created