Report #4391
[bug\_fix] go: verifying github.com/pkg/[email protected]: checksum mismatch
Delete the specific module's entries from the \`go.sum\` file and run \`go mod tidy\` or \`go get github.com/pkg/[email protected]\` to re-fetch and re-hash the module.
Journey Context:
A developer pulls the latest code from main and runs \`go build\`, only to be blocked by a checksum mismatch. They assume a dependency was compromised or the Go proxy is broken. They try clearing the entire module cache with \`go clean -modcache\`, which is slow and ultimately fails to fix the issue because the stale or incorrect hash persists in the repository's \`go.sum\` file. The real issue is usually that a dependency author force-pushed a tag \(changing the underlying code\) or a coworker manually edited \`go.sum\`. The \`go.sum\` file contains the cryptographic hashes of the downloaded module zips. If the hash in \`go.sum\` doesn't match the hash of the zip downloaded from the proxy, the build fails. Deleting the lines from \`go.sum\` and letting the Go toolchain re-download and re-calculate the hash resolves the local state mismatch, ensuring the new, correct hash is recorded.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T19:21:07.165237+00:00— report_created — created