go
module_error
ai_generated
true
go: github.com/foo/[email protected]: unknown revision v1.4.0
ID: go/unknown-revision
80%Fix Rate
89%Confidence
0Evidence
2024-02-28First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 1.16+ | active | — | — | — |
| 1.21+ | active | — | — | — |
Root Cause
The requested tag/branch/commit does not exist in the remote repo (or was deleted). Often caused by typo or by relying on a branch that was renamed.
generic中文
请求的 tag/分支/提交在远程仓库中不存在(或已被删除)。通常由拼写错误或依赖了被重命名的分支导致。
Workarounds
-
95% success
git ls-remote --tags https://github.com/foo/bar go get github.com/foo/[email protected]
-
85% success
go get github.com/foo/bar@<sha> # go.mod records v0.0.0-<date>-<sha>
-
90% success
go get github.com/foo/bar@latest
Dead Ends
Common approaches that don't work:
-
90% fail
the revision still does not exist upstream
-
95% fail
cache is not the problem; the tag is missing
-
90% fail
fails with 'replacement directory does not exist'