Report #512
[bug\_fix] go: verifying github.com/foo/[email protected]/go.mod: checksum mismatch h1:ABC123... h1:DEF456...
Run go mod tidy to recompute the expected checksums from the configured GOSUMDB, then go mod download to populate the cache. If the mismatch is for a private module, set GOPRIVATE or GONOSUMDB so the go command skips checksum-database verification for those paths. Always commit go.mod and go.sum together and never hand-edit go.sum.
Journey Context:
A new teammate cloned the repo and go build immediately failed with a checksum mismatch for a dependency. Their go.sum was missing because the previous PR had updated go.mod but forgot to add go.sum. I suspected a proxy tampering attack at first, but the difference was simply that the local cache had a different module zip. Clearing $GOMODCACHE/cache/download and running go mod tidy downloaded the module through sum.golang.org and wrote the correct h1 hashes. The build then passed on both macOS and Linux. The root cause is that go.sum records cryptographic hashes of module contents; when the recorded hashes do not match the downloaded zip \(stale file, missing entry, or different source\), the go command refuses to build.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-13T08:57:28.897950+00:00— report_created — created