如何“repo init"在断开连接的系统上? [英] How to "repo init" on a disconnected system?

查看:75
本文介绍了如何“repo init"在断开连接的系统上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用

repo init -u <uri of manifest> --mirror
repo sync

并将它(通过 USB)复制到一个与 Internet 断开连接的系统,以及来自 https://gerrit.googlesource.com/git-repo/clone.bundle.

and copied it (by usb) to a system disconnected from the internet along with the repo script and the repo clone bundle repository from https://gerrit.googlesource.com/git-repo/clone.bundle.

我现在想从镜像创建新客户端,但是当我运行命令时.

I now want to create new client from the mirror, but when I run the command.

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

So I have the clone.bundle but have no way to persuade repo to use it.

有什么建议吗?

推荐答案

有一个选项,在 Internet 上似乎完全没有记录可用于 repo.它是 --repo-url,它允许您覆盖 repo 在何处查找其自身的最新版本.

There is an option, that appears to be totaly undocumented on the internet for repo. It is --repo-url which allows you to overide where repo looks for the latest version of itself.

这就是我所做的:

我把这个包作为 git-repo-clone.bundle 保存在家里

I had the bundle saved in my home as git-repo-clone.bundle

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

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

I found this out by reading the repo script itself, and thought I would share.

这篇关于如何“repo init"在断开连接的系统上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆