Report #67869
[bug\_fix] verifying go.mod: github.com/user/[email protected]: reading at revision v1.2.3: unknown revision v1.2.3
Clear the local module cache using go clean -modcache and re-download dependencies.
Journey Context:
A developer is building a project and encounters an unknown revision error for a third-party dependency. They check the repository on GitHub and confirm the tag v1.2.3 exists. They might try deleting the go.sum file, running go get -u, or even manually modifying go.mod, but the Go toolchain stubbornly insists the revision is unknown. The rabbit hole leads them to believe the repository is broken or their Git is misconfigured. The real root cause is that the upstream maintainer deleted the v1.2.3 git tag and force-pushed a new commit with the same tag name. The Go module proxy \(proxy.golang.org\) cached the original commit hash for v1.2.3, but the local Go toolchain is trying to resolve the tag to a commit and finding a mismatch or missing commit in the local cache. Because Go strictly enforces immutability for version tags, it fails. The fix is to clear the local module cache with go clean -modcache to purge the stale mapping, forcing a fresh resolution.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T20:23:56.501826+00:00— report_created — created