Report #46810
[bug\_fix] go: verifying go.mod: ... checksum mismatch
Clear the local module cache using \`go clean -modcache\` and run \`go mod tidy\`. If the module is private, set GONOSUMDB or GONOSUMCHECK environment variables to bypass the public checksum database.
Journey Context:
A CI pipeline breaks overnight with a checksum mismatch. The developer assumes a supply chain attack or a corrupted cache. They delete go.sum and re-commit, but CI still fails. The rabbit hole: The developer's local go.sum had an old hash for a dependency whose author force-pushed a new tag with the same version \(violating Go's immutability rule\). The Go checksum database \(sum.golang.org\) caught the discrepancy between the new hash and the globally recorded old hash. Deleting go.sum doesn't bypass the checksum DB. The fix works because \`go clean -modcache\` removes the corrupted/updated local copy, forcing a fresh fetch. If it's a private repo, setting GONOSUMDB tells the go command to skip the global DB for that specific module path, relying only on the local go.sum file.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T09:02:39.597399+00:00— report_created — created