为 Gerrit 配置复制配置文件



My Gerritreplication.config看起来像:

[remote "company-svc"]
projects = dev-portal-ui
url = git@gitlab.eng.company.com:/core-build/${name}.git
push = +refs/heads/*:refs/heads/*

我能够使用命令镜像克隆:

cd ${GERRIT_SITE}/git
git clone --mirror ssh://git@gitlab.eng.company.com/core-build/dev-portal-ui.git

在Gitlab上,我发现ssh URL为:

git@gitlab.eng.company.com:core-build/dev-portal-ui.git

我的replication.config配置是否正确?

是的,是的。

两个 SSH URL 语法都是正确的:

ssh://git@server/...
git@server:...

第一个是SSH URI方案,第二个是类似scp的语法。