Replication
從一個 Gerrit 複製到另一個 Gerrit
我想將一個項目/儲存庫從一個 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
行更改為:url = ssh://gerrit@192.168.1.106:29418/${name}
問題消失了。Gerrit 開始看到遠端倉庫。