Report #12795
[bug\_fix] verifying github.com/company/[email protected]/go.mod: checksum mismatch
Set the \`GOPRIVATE\` environment variable to include the private repository path \(e.g., \`export GOPRIVATE=github.com/company/\*\`\).
Journey Context:
A developer sets up a CI pipeline for a private Go project. The build fails with a checksum mismatch or an inability to find the private module. They assume their credentials are wrong and spend hours debugging Git authentication and SSH keys. The real issue is that the Go toolchain defaults to fetching modules via the public proxy \(\`proxy.golang.org\`\) and checksum database \(\`sum.golang.org\`\). Since the private repo is inaccessible to the proxy, the proxy returns an error or a 404, and the checksum database has no record of it. The fix is to set the \`GOPRIVATE\` environment variable. This instructs the Go toolchain to download the module directly from the source repository and skip the checksum database, bypassing the public proxy entirely for matching paths.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T16:54:40.243197+00:00— report_created — created