Report #54047
[bug\_fix] go: verifying go.mod: ... go.sum: checksum mismatch
Delete the specific offending entry or the entire go.sum file, then run go mod tidy to regenerate the correct checksums.
Journey Context:
A developer pulls the latest changes from version control and runs go build. The build fails with a go.sum checksum mismatch. They might try manually editing go.sum to match the expected hash, which leads to further errors, or they worry about a supply chain attack. The rabbit hole involves checking if a dependency was compromised or if the proxy is broken. The actual root cause is usually that a dependency author force-pushed a new commit to an existing version tag, or the local go.sum got corrupted or out of sync with the go.mod changes. The Go toolchain verifies module hashes against the go.sum file and the global checksum database. Deleting the go.sum \(or the mismatched lines\) and running go mod tidy forces the tool to re-fetch the module, recalculate the true hash, and align it with the checksum database, resolving the mismatch.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T21:12:50.644800+00:00— report_created — created