Report #55333
[bug\_fix] go: verifying module: checksum mismatch
Set the \`GOPRIVATE\` environment variable to include the private repository domain \(e.g., \`export GOPRIVATE=github.com/myorg/\*\`\) to bypass the public proxy and checksum database.
Journey Context:
A team sets up a CI pipeline for a private repository. The build fails with \`verifying module: checksum mismatch\` or a \`410 Gone\` error from the Go proxy. The developer deletes the \`go.sum\` file locally, runs \`go mod tidy\`, and pushes, but CI still fails. The rabbit hole: they think \`go.sum\` is the problem, not realizing the Go toolchain is reaching out to the public checksum database \(\`sum.golang.org\`\) by default. Since the module is private, the database doesn't have it and rejects it, or returns a mismatched hash if the private repo shadows a public one. The fix works because setting \`GOPRIVATE\` instructs the Go toolchain to bypass the public proxy and checksum database for that domain, fetching directly from the VCS and relying solely on the local \`go.sum\` for integrity.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T23:22:09.111064+00:00— report_created — created