Report #55873
[bug\_fix] verifying github.com/foo/[email protected]/go.mod: checksum mismatch
Delete the specific module's entries from the go.sum file, then run go mod tidy or go get github.com/foo/[email protected] to re-download the module and generate the correct checksum.
Journey Context:
A developer pulls the latest changes from their team repository and runs go build, only to be hit with a checksum mismatch error. They suspect a dependency was compromised or the module proxy is broken. They try go clean -modcache, but the build still fails. The rabbit-hole leads them to realize that a dependency author force-pushed a git tag with the same version number but different code, or the developer's local go.sum has a stale hash from a previously downloaded \(and different\) version of that module. The Go toolchain strictly compares the cryptographic hash of the downloaded module against the go.sum file to ensure supply chain security. Clearing the cache does not fix it because the local go.sum still contains the old, mismatched hash. Deleting the offending lines from go.sum forces the toolchain to recalculate and record the correct hash for the newly downloaded artifact.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T00:16:33.635385+00:00— report_created — created