$ 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执行成功。
还有一个思路:对应下载的git-repo仓库自身的问题,需要切换对应的git-repo源的位置。
版权归原作者 weixin_41300371 所有, 如有侵权,请联系我们删除。