Report #86119
[bug\_fix] go: verifying go.sum: missing or invalid checksum or go: github.com/user/[email protected]: go.sum has incorrect or unexpected checksum
If the module is public and legitimately re-tagged, the maintainer must release a new version tag \(as Go enforces version immutability\). To unblock locally, run go get github.com/user/repo@ or delete the specific lines from go.sum and run go mod tidy, but the ultimate fix is avoiding re-tagged versions.
Journey Context:
A developer pulls the latest main branch and runs go build, only to be hit with a checksum mismatch for a third-party dependency. They assume their local cache is corrupted and run go clean -modcache, but the error persists. They dig into the go.sum file and try deleting the offending lines, but go mod tidy brings the error back. They investigate the dependency's Git history and discover the maintainer deleted the v1.2.3 tag and pushed a new commit to the same v1.2.3 tag. Go's module system strictly enforces version immutability; once a version is published, its checksum is recorded in the Go checksum database and local go.sum. A re-tag violates this, causing the downloaded hash to mismatch the database. The developer reports the issue to the maintainer, who releases a v1.2.4 tag, and updating to v1.2.4 resolves the build.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T03:08:30.605436+00:00— report_created — created