【问题标题】:Setup mirror repo from overseas server to local server设置从海外服务器到本地服务器的镜像仓库
【发布时间】:2014-01-22 14:08:06
【问题描述】:

我们的项目涉及中国的 5 名开发人员和美国的 3 名开发人员。中国的服务器机器被认为是主机。我想设置一个从中国服务器到美国服务器的 repo 镜像,以便我们的本地开发人员可以更快地repo sync。目前,来自中国服务器的repo init / sync 花了 5 个小时。

例如,假设中国服务器为server1.china.com,美国服务器为server2.usa.com

项目从中国服务器拉取使用命令:

repo init -u ssh://server1.china.com/projectA/standard.git -b release17
repo sync

我希望能够设置一个本地镜像,以便拉取项目成为:

repo init -u ssh://server2.usa.com/projectA/standard.git -b release 17
repo sync

我预计还需要一个 cron 作业来定期运行,以便在初始设置后将最新的更改从 server1 拉到 server2。

我看到过关于使用 git clone --mirror 的讨论,但不太确定它是否能满足我的需求。

谢谢

【问题讨论】:

标签: git repository mirror


【解决方案1】:

你想要的是repo init --mirror,来自repo init -h

--mirror            create a replica of the remote repositories rather
                    than a client working directory

创建后,您可以使用repo sync 使其保持最新状态。

【讨论】:

  • 这样做之后,我不得不修改.repo/manifests/default.xml文件,如this post
猜你喜欢
  • 2017-04-01
  • 1970-01-01
  • 2014-04-07
  • 2019-10-08
  • 2017-04-08
  • 1970-01-01
  • 2011-10-31
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多