Report #102947
[bug\_fix] go.sum verification failed: checksum mismatch or missing go.sum entry
Run \`go mod tidy\` to recompute and record the correct cryptographic hashes. If the mismatch is caused by a corrupted module cache, clear it with \`go clean -modcache\` first. In CI, commit both \`go.mod\` and \`go.sum\` and use \`go mod verify\` as a gate.
Journey Context:
A developer merged a PR that added a dependency but only committed \`go.mod\`; \`go.sum\` was in \`.gitignore\`. The next day CI failed with \`verifying github.com/foo/[email protected]: checksum mismatch\`. They tried pinning the dependency with \`@commit-hash\`, which changed the error to \`missing go.sum entry\`. They suspected a man-in-the-middle attack and checked the proxy, but the real problem was that Go uses \`go.sum\` to lock the content of every module version. Running \`go mod tidy\` regenerated the missing checksums, and after removing \`go.sum\` from \`.gitignore\` the build became reproducible across machines.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-10T04:45:39.116779+00:00— report_created — created