Report #62019
[bug\_fix] go: verifying module: checksum mismatch
Run \`go clean -modcache\` to clear the local cache, then \`go mod tidy\` to regenerate \`go.sum\`. If the dependency author force-pushed a tag, pin the dependency to a specific untagged commit hash instead of the mutated tag.
Journey Context:
A developer pulls the latest code from main and runs \`go build\`, only to be hit with a checksum mismatch for a specific dependency version. They delete \`go.sum\` and regenerate it, but the error persists. They dive into the module cache, trying to delete the specific package folder, but the hash still doesn't match the global cache. The root cause is that the author of the dependency force-pushed a new commit to the same version tag \(e.g., \`v1.2.3\`\), violating the immutability principle of Semantic Versioning. The local Go cache holds the old hash, while the proxy serves the new hash. The fix works because clearing the entire module cache removes the stale hash, allowing \`go mod tidy\` to fetch the current artifact and record its new hash. However, the real solution is avoiding mutated tags, as this breaks reproducible builds for anyone who cached the old tag.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T10:35:12.118592+00:00— report_created — created