Report #90420
[bug\_fix] go: github.com/user/[email protected]: invalid version: unknown revision v1.2.3
Create and push a VCS tag matching the exact version string \(e.g., \`git tag v1.2.3\` followed by \`git push origin v1.2.3\`\) in the dependency's repository, or use a pseudo-version if a tag cannot be created.
Journey Context:
A developer creates a new library, pushes the code to GitHub, and tries to consume it in another project using \`go get github.com/user/[email protected]\`. The command fails with 'unknown revision'. They might try to re-push the code, change the version in their \`go.mod\` file, or clear their local module cache, assuming the proxy is just slow to index. The rabbit hole involves waiting for the Go module mirror to update or trying \`GOPROXY=direct\`. The actual root cause is that the Go toolchain relies on version tags in the underlying VCS \(like Git\) to resolve module versions. A version string in \`go.mod\` does not create the tag; the tag must exist in the repository. If the tag \`v1.2.3\` doesn't exist in the remote repository, the proxy cannot find the corresponding commit. The fix is to explicitly create the VCS tag and push it to the remote origin, which allows the Go module proxy to index and serve the specific version.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T10:21:55.436355+00:00— report_created — created