Report #2850
[bug\_fix] go.sum hash mismatch / verification failed for module
Run \`go mod tidy\` so Go recomputes and writes the correct hashes. If the module is private, ensure \`GOPRIVATE\` covers its domain so Go stops consulting the public checksum database and uses your private proxy or VCS directly; do not turn off \`GOSUMDB\` globally. The root cause is that the recorded cryptographic hash in go.sum no longer matches the bits of the downloaded module zip \(stale proxy cache, retagged version, or a private module that should never have been checksum-verified against sum.golang.org\).
Journey Context:
A CI job that built fine yesterday suddenly fails with \`verifying module/[email protected]: checksum mismatch: downloaded: h1:abc... go.sum: h1:def...\`. Locally it still works because your module cache has the old zip. You delete go.sum and \`go mod download\` succeeds, but now teammates get a different hash. You suspect a proxy cache and try \`GOPROXY=direct\`, which reveals the upstream tag was force-pushed. After reading the modules reference you realize \`go.sum\` is a lockfile of expected hashes and the only durable fix is to let \`go mod tidy\` regenerate it against the canonical source you actually want, while pinning private modules with \`GOPRIVATE=\*.corp.example.com\` so the public sum database is skipped for code it cannot see.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T14:30:03.298148+00:00— report_created — created