$ repo init -u git@gitlab1.com:abcd/manifest.git --repo-url=git@gitlab1.com:abcd/git-repo.git --no-repo-verify -m default.xml
报如下错误
Downloading Repo source from git@gitlab1.com:abcd/git-repo.git
remote: Enumerating objects: 7468, done.
remote: Total 7468 (delta 0), reused 0 (delta 0), pack-reused 7468
repo: warning: verification of repo code has been disabled;
repo will not be able to verify the integrity of itself.
repo: error: unable to resolve "stable"
fatal: double check your --repo-rev setting.
fatal: cloning the git-repo repository failed, will remove '.repo/repo'
可以发现,这个地方已经触发了下载动作。还提示无法解决"stable"的错误。报了致命的--repo-rev
通过如下源码分析得到:
committish就是REPO_REV的值。通过设置环境变量即可绕过对应的致命错误。
setenv REPO_REV refs/heads/origin (or export REPO_REV=refs/heads/origin)
从而顺利下载对应的代码。repo init执行成功。文章来源:https://www.toymoban.com/news/detail-778674.html
还有一个思路:对应下载的git-repo仓库自身的问题,需要切换对应的git-repo源的位置。文章来源地址https://www.toymoban.com/news/detail-778674.html
到了这里,关于gitlab和repo报错解决办法分享的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!