我想将一个项目/存储库从一个 Gerrit 复制到另一个 Gerrit。我的复制配置:
[remote "gerrit3"]
url = 192.168.1.106:29418/${name}
adminUrl = gerrit+ssh://192.168.1.106/
push = refs/*:refs/*
replicatePermissions = true
replicateHiddenProjects = true
mirror = false
projects = tests/test1
replicationDelay = 0
createMissingRepositories = true
触发复制后,我在复制日志中看到以下消息:
[2019-07-25 14:11:00,249] [] scheduling replication tests/test1:..all.. => 192.168.1.106:29418/tests/test1
[2019-07-25 14:11:00,251] [] scheduled tests/test1:..all.. => [f208c682] push 192.168.1.106:29418/tests/test1 to run after 0s
[2019-07-25 14:11:00,253] [f208c682] Replication to 192.168.1.106:29418/tests/test1 started...
[2019-07-25 14:11:00,463] [f208c682] Missing repository created; retry replication to 192.168.1.106:29418/tests/test1
[2019-07-25 14:12:00,465] [f208c682] Replication to 192.168.1.106:29418/tests/test1 started...
[2019-07-25 14:12:00,689] [f208c682] Missing repository created; retry replication to 192.168.1.106:29418/tests/test1
[2019-07-25 14:13:00,690] [f208c682] Replication to 192.168.1.106:29418/tests/test1 started...
[2019-07-25 14:13:00,996] [f208c682] Missing repository created; retry replication to 192.168.1.106:29418/tests/test1
最后两行永远重复。看起来源 Gerrit 看不到远程存储库,无论远程存储库是否存在。如果不是,它会正确创建空仓库,但在此之后 Gerrit 仍然看不到它。
问题在
url
排队。文档示例显示未指定协议的 url,但也提到该url
参数与git push
url 语法兼容。将url
行更改为:问题消失了。Gerrit 开始看到远程仓库。