git - 是否可以使用 SSH 协议(protocol)在 gitlab.com 上镜像私有(private)存储库?

标签 git ssh gitlab ssh-keys

Gitlab.com 有一个选项可以在他们自己的站点上镜像其他存储库。 (项目-->项目设置-->镜像仓库)

但是当我尝试使用 ssh 协议(protocol)执行此操作时,授权失败,因为我要克隆的存储库无法识别 Gitlab.com 的公钥。

页面声明:

If your SSH repository is not publicly accessible, add the public SSH key of the GitLab server to the remote repository.

问题是,我找不到将私钥添加到 Gitlab.com 或从 Gitlab.com 下载公钥的选项。

这是否只有在您拥有 GitLab 服务器时才有可能,还是我忽略了什么?

最佳答案

Gitlab mirroring featureimplemented recently on Nov 2015但不幸的是,它仅适用于 Gitlab 企业版:

Repository Mirroring (EE only) If you want to maintain a mirror of a repository in a GitLab instance, you can now let GitLab handle the mirroring for you automatically in GitLab Enterprise Edition.

检查 the features comparison在社区版和企业版之间 您请求 EE 或使用 gitlab-mirrors脚本:

The gitlab-mirrors project is designed to fill in a feature which is currently missing from GitLab: the ability to mirror remote repositories. gitlab-mirrors creates read only copies of remote repositories in gitlab. It provides a CLI management interface for managing the mirrored repositories (e.g. add, delete, update) so that an admin may regularly update all mirrors using crontab. It operates by interacting with the GitLab API using python-gitlab3. Also, check out this cool puppet module for installing and configuring gitlab-mirrors.

关于git - 是否可以使用 SSH 协议(protocol)在 gitlab.com 上镜像私有(private)存储库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33875818/

相关文章:

windows - 在 Windows 上的 emacs 中使用 "git add -p"的最佳方法是什么?

windows - 配置 git 以支持使用不同操作系统的程序员

merge - 关闭 gitlab 合并请求

python - 如何使用 gitlab-ci 管理相互依赖的轮子的测试/构建

api - gitlab API 未经授权

git - `git status` 显示工作树文件夹

git - 为什么 Heroku 不接受空文件夹?

php - 如何将 SSH 隧道反向到 Xdebug 的远程 docker 容器?

linux - 当我使用 ipv6 主机名时,ssh 连接在 1m 后被远程关闭

ssh - 管理多个反向SSH隧道