Report #12987
[bug\_fix] go: verifying [email protected]/go.mod: checksum mismatch
Delete the specific module's entries from the \`go.sum\` file, then run \`go mod tidy\` to re-download the module and generate the correct checksum.
Journey Context:
A developer pulls the latest main branch and runs \`go build\`, only to be blocked by a checksum mismatch for a specific dependency. They suspect a supply chain attack or corrupted local cache. They might try \`go clean -modcache\`, which works but is slow and doesn't fix the root cause for others. The real issue is often that a dependency author force-pushed a Git tag \(overwriting v1.2.3 with different code\) or the developer's local \`go.sum\` is out of date. The established fix is to remove the offending lines from \`go.sum\` and run \`go mod tidy\`. This forces the Go toolchain to fetch the module from the proxy, verify it against the public checksum database \(sum.golang.org\), and write the new, correct checksum. It works because \`go.sum\` is a verifiable record; if the upstream source changed illegitimately, the checksum database will catch it, but if it's just a local \`go.sum\` staleness, re-fetching aligns everything.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T17:25:21.144165+00:00— report_created — created