Report #68088
[bug\_fix] go: verifying github.com/foo/[email protected]: checksum mismatch
Run go get github.com/foo/[email protected] to update the go.sum file with the new checksum, acknowledging that the upstream author re-pushed the tag. If this is unexpected, verify the diff for security implications.
Journey Context:
A developer pulls the latest main branch and runs go build, only to be hit with a checksum mismatch for a specific dependency version. Another developer on the same commit builds fine. The developer assumes their local module cache is corrupted and deletes it, but the error persists. They suspect a man-in-the-middle attack or a broken corporate proxy. The rabbit hole leads them to inspect the GONOSUMCHECK and GONOSUMDB environment variables. The real root cause is that the maintainer of the upstream dependency deleted the v1.2.3 git tag and re-pushed it pointing to a different commit \(a major anti-pattern in Go\). The Go checksum database \(sum.golang.org\) recorded the original commit's hash. When the developer's toolchain fetches the module, the proxy serves the new commit, but the local go.sum and the checksum database still expect the old hash. The fix works because go get bypasses the strict verification against the old go.sum entry, fetches the current reality of v1.2.3, and updates go.sum to match the new commit's hash, allowing the build to proceed.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T20:46:03.860654+00:00— report_created — created