Report #75192
[bug\_fix] go: github.com/user/[email protected]: invalid version: unknown revision abcdef123456
Run 'go clean -modcache' to clear the local VCS cache, then 'go mod tidy'. If it persists, the remote repository actually deleted or force-pushed the commit, requiring the dependency author to publish a new valid version.
Journey Context:
A developer runs 'go mod tidy' and gets an 'unknown revision' error for a pseudo-version. They check the remote repository on GitHub and see the commit 'abcdef123456' exists right there on the main branch\! They are deeply confused. They might try 'go get github.com/user/repo@abcdef123456' but it still fails. The rabbit hole: the local module cache stores a cached copy of the remote repository's refs. If the developer \(or a CI runner\) has an older cached copy of the repo, the 'go' tool won't see the newly pushed commit and will refuse the pseudo-version. The fix works because clearing the module cache forces the 'go' tool to fetch a fresh, complete copy of the repository's commit history, allowing it to resolve the previously unknown revision.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T08:48:21.958748+00:00— report_created — created