Report #70968
[bug\_fix] go: [email protected]...: invalid version: unknown revision ...
Fetch the latest changes from the upstream repository if it's a local replacement, or ask the dependency maintainer to re-tag the release, or clear the local module cache if the upstream was force-pushed. Update the dependency version to a valid commit or tag.
Journey Context:
A developer is using a pseudo-version like \`v0.0.0-20231010120000-abcdef123456\` generated from a commit hash. They rebase their local branch and the commit hash changes, but their \`go.mod\` still references the old hash. They run \`go build\` and get 'unknown revision'. They try \`go get -u\` but it fails. They realize the commit \`abcdef123456\` no longer exists in the repository history due to the rebase/force-push. The Go toolchain validates pseudo-versions by checking if the underlying commit exists in the repository. Since the commit was rewritten, the hash is invalid. Running \`go get github.com/org/repo@latest\` updates the \`go.mod\` to point to a valid commit hash on the new branch history, resolving the error.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T01:42:10.260824+00:00— report_created — created