Report #15401
[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 bypass the public proxy and checksum database \(e.g., export GOPRIVATE=github.com/myorg/\*\). Also ensure .gitconfig has an insteadOf rule for SSH if required.
Journey Context:
A developer adds a private internal repository as a dependency. When running go mod tidy, the build fails with a 404 or 410 from sum.golang.org. They initially suspect a GitHub token issue or a typo in the version, spending hours checking CI credentials and regenerating tokens. The actual root cause is that the Go toolchain defaults to fetching modules via the public proxy \(proxy.golang.org\) and verifying them against the public checksum database \(sum.golang.org\). Since the repo is private, the proxy cannot fetch it, and the sumdb has no record of it. Setting GOPRIVATE tells the Go toolchain to fetch the module directly from the source and skip checksum verification against the public database, resolving the 404.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T23:55:58.210356+00:00— report_created — created