我已经镜像了一个存储库
repo init -u <uri of manifest> --mirror
repo sync
并(通过 USB)将它与来自 https://gerrit.googlesource.com/git-repo/clone.bundle 的 repo 脚本和 repo 克隆包存储库一起复制到与 Internet 断开连接的系统中.
我现在想从镜像创建新客户端,但是当我运行命令时。
repo init -u <uri of manifest on mirror>
我收到以下错误。
fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
fatal: error [Errno -2] Name or service not known
所以我有 clone.bundle 但无法说服 repo 使用它。
有什么建议么?
最佳答案
有一个选项,似乎在互联网上完全没有记录用于 repo 。它是 --repo-url ,它允许您覆盖 repo 查找自身最新版本的位置。
这就是我所做的:
我将捆绑包保存在我家中作为 git-repo-clone.bundle
repo init -u < uri of manifest on mirror > --repo-url ~/git-repo-clone.bundle
我通过阅读 repo 脚本本身发现了这一点,并认为我会分享。
关于repository - 如何在断开连接的系统上 "repo init"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18895382/