Report #46137
[bug\_fix] verifying [email protected]: checksum mismatch or 404/410 from proxy.golang.org for private repositories
Set the \`GOPRIVATE\` environment variable to match the private repository hostname \(e.g., \`GOPRIVATE=gitlab.company.com\`\) to bypass the public proxy and checksum database.
Journey Context:
A developer tries to build a project that depends on an internal private Git repository. The build fails with a checksum mismatch or a 404/410 error from \`proxy.golang.org\` or \`sum.golang.org\`. They check their Git credentials, which are fine. They try \`go get\` directly, but it still fails. The rabbit hole reveals that by default, Go routes all module fetches through the public Go module proxy and checksum database. Since the private repo isn't public, the proxy returns an error, and the checksum DB can't verify it. Setting \`GOPRIVATE=gitlab.company.com\` tells the Go toolchain to bypass both the public proxy and the checksum database for modules matching that pattern, fetching directly from the source and skipping sum verification.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T07:54:55.456520+00:00— report_created — created