Report #5483
[bug\_fix] go: verifying [email protected]/go.mod: checksum mismatch
Run \`go clean -modcache\` to clear the local cache, then \`go mod tidy\`. If the dependency is private, set the \`GOPRIVATE\` environment variable to bypass the public proxy and checksum database.
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. They assume the dependency is corrupted or compromised. They delete the \`go.sum\` entry and run \`go mod tidy\`, but the error persists. They go down a rabbit hole of checking Git histories to see if a coworker maliciously altered the \`go.sum\`. The actual root cause is that the Go module proxy \(proxy.golang.org\) cached the original version of the dependency, but the upstream repository force-pushed a new commit to the same tag. The proxy serves the old hash, while the direct VCS fetch might serve the new one, causing a conflict. Clearing the local cache forces a consistent re-fetch from the proxy. If it's a private repo, the proxy shouldn't be used at all, hence \`GOPRIVATE\`.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T21:21:02.759164+00:00— report_created — created