go
module_error
ai_generated
true
go: github.com/foo/[email protected]: 未知修订版本 v1.4.0
go: github.com/foo/[email protected]: unknown revision v1.4.0
ID: go/unknown-revision
80%修复率
89%置信度
0证据数
2024-02-28首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 1.16+ | active | — | — | — |
| 1.21+ | active | — | — | — |
根因分析
请求的 tag/分支/提交在远程仓库中不存在(或已被删除)。通常由拼写错误或依赖了被重命名的分支导致。
English
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.
解决方案
-
95% 成功率
git ls-remote --tags https://github.com/foo/bar go get github.com/foo/[email protected]
-
85% 成功率
go get github.com/foo/bar@<sha> # go.mod records v0.0.0-<date>-<sha>
-
90% 成功率
go get github.com/foo/bar@latest
无效尝试
常见但无效的做法:
-
90% 失败
the revision still does not exist upstream
-
95% 失败
cache is not the problem; the tag is missing
-
90% 失败
fails with 'replacement directory does not exist'