【问题标题】:How to "repo init" on a disconnected system?如何在断开连接的系统上“repo init”?
【发布时间】:2013-09-19 13:02:45
【问题描述】:

我已经镜像了一个仓库

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 使用它。

有什么建议吗?

【问题讨论】:

    标签: repository


    【解决方案1】:

    有一个选项,在互联网上似乎完全没有记录用于回购。它是 --repo-url ,它允许您覆盖 repo 查找自身最新版本的位置。

    这就是我所做的:

    我将包作为 git-repo-clone.bundle 保存在我家中

    repo init -u < uri of manifest on mirror > --repo-url ~/git-repo-clone.bundle
    

    我通过阅读 repo 脚本本身发现了这一点,并认为我会分享。

    【讨论】:

      【解决方案2】:

      有一个选项可以忽略克隆包。

      repo init -u <your-manifest-mirror-url> --no-clone-bundle
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-08-21
        • 2020-04-07
        • 1970-01-01
        • 2014-10-05
        • 1970-01-01
        相关资源
        最近更新 更多