
我想將一個專案/儲存庫從一個 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 仍然看不到它。
答案1
問題就出在url
排隊上。文件範例顯示未指定協定的 url,但也提到該參數與url 語法url
相容。更改行git push
後:url
url = ssh://[email protected]:29418/${name}
問題消失了。 Gerrit 開始查看遠端儲存庫。