Report #91890
[bug\_fix] go: github.com/user/[email protected]: invalid version: unknown revision abcdef123456
Update the dependency to a valid commit or branch using \`go get github.com/user/repo@main\` \(or the specific branch\), which resolves the latest valid commit hash. This overwrites the stale pseudo-version in go.mod.
Journey Context:
A team is working on an internal private library. They delete a feature branch on Git and recreate it from main, squashing the history. Suddenly, their CI pipeline fails to build the main application, complaining about an 'unknown revision' for a pseudo-version. The developer clears the Go module cache and deletes go.sum, but \`go mod tidy\` still fails with the same error. They dig into the go.mod and see a version like \`v0.0.0-20230101000000-abcdef123456\`. The realization dawns: pseudo-versions encode a specific commit hash. Because the branch was deleted and recreated, the commit \`abcdef123456\` no longer exists in the remote repository. The Go proxy cannot verify it. The fix is to explicitly fetch the dependency at its current valid state \(e.g., \`@main\`\), allowing Go to calculate a new pseudo-version based on the current HEAD commit, replacing the ghost reference.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T12:49:41.856539+00:00— report_created — created