简体   繁体   English

git:镜像远程git服务器上存在的所有存储库?

[英]git: mirror all repositories that exist on a remote git server?

I am in the process of setting up a git server that mirrors all existing and future repositories that exist on our primary git server. 我正在设置一个git服务器,以镜像主git服务器上存在的所有现有和将来的存储库。 Since I can't statically list all repositories to mirror I am wondering the best way to retrieve this list and perform 'git clone --mirror' on each. 由于我无法静态列出所有要镜像的存储库,因此我想知道检索此列表并在每个存储库上执行“ git clone --mirror”的最佳方法。

Alternatively a push method that keeps the mirror in sync would be fine too. 或者,使镜像保持同步的推送方法也可以。 What are others doing? 别人在做什么? I'm new to git (sys admin). 我是git的新手(系统管理员)。

简单地说:

ssh theservername ls /some/path/under/which/the/repos/live/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM