Report #57299
[bug\_fix] go: verifying go.sum: checksum mismatch
Clear the local module cache using go clean -modcache, then run go mod tidy to regenerate go.sum with the correct checksums from the Go module mirror.
Journey Context:
A developer pulls the latest code from main and runs go build, only to be hit with a checksum mismatch error. They try deleting go.sum and regenerating it, but the error persists. They might suspect a supply chain attack or a corrupted Git repository. The rabbit hole involves checking Git history and verifying dependencies manually. The actual root cause is often a corrupted local module cache \(perhaps due to a failed download, a proxy returning an error page, or a dependency author force-pushing a Git tag\). The Go toolchain compares the hash of the downloaded zip against the hash in go.sum. If the local cache has a corrupted download, the hash won't match. Running go clean -modcache forces a fresh download from the Go module mirror \(proxy.golang.org\), which guarantees cryptographic consistency for version tags, thus resolving the mismatch.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T02:39:49.484239+00:00— report_created — created