Report #96341
[bug\_fix] go: verifying github.com/user/[email protected]: checksum mismatch
Run go clean -modcache to clear the local module cache, then go mod tidy to re-download the module. If the error persists, the upstream author force-pushed a new commit to the same tag, violating immutability; the upstream must release a new version tag. The root cause is a hash mismatch between the go.sum entry and the downloaded module, often due to a corrupted local cache or an upstream tag mutation.
Journey Context:
A developer pulls the latest code from main and runs go build, only to be blocked by a checksum mismatch error. They might try deleting the specific line from go.sum and running go get, which temporarily bypasses the error but is dangerous. They might suspect a supply chain attack or a proxy issue. The debugging rabbit hole involves checking if the dependency was compromised. However, the most common cause in corporate environments or CI is a corrupted download in the local module cache, or an author who force-pushed a tag. The correct, safe fix is to clear the local cache to force a fresh download from the origin or proxy. If the error persists after clearing the cache, it means the upstream author mutated the tag, and the developer must coordinate with the upstream to release a new version \(e.g., v1.0.1\) rather than violating the go.sum integrity.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T20:17:33.712570+00:00— report_created — created