Report #22324
[bug\_fix] go: verifying go.sum: checksum mismatch
Delete the go.sum file and run \`go mod tidy\` to regenerate it, or run \`go get @\` to update the specific entry. If the error persists globally, the dependency author may have force-pushed a tag, requiring a version bump on their end.
Journey Context:
A developer pulls the latest code from main and runs \`go build\`, only to be blocked by a checksum mismatch for a specific dependency. They might try \`go clean -modcache\` or deleting the local \`go.sum\`, but if they regenerate it, CI still fails. The rabbit-hole often involves suspecting a supply chain attack or a corrupted proxy. The root cause is usually that a dependency author force-pushed a git tag \(changing the commit it points to\) or the \`go.sum\` file in the repository has merge conflicts/stale entries. The Go toolchain verifies downloaded modules against \`go.sum\` and the global checksum database \(sum.golang.org\). If the downloaded hash doesn't match, it fails. Deleting \`go.sum\` and regenerating via \`go mod tidy\` fetches the correct current hashes, aligning the local state with the checksum database.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T15:52:59.800316+00:00— report_created — created