ある Gerrit から別の Gerrit へのレプリケーション

ある Gerrit から別の Gerrit へのレプリケーション

ある Gerrit から別の Gerrit に 1 つのプロジェクト/リポジトリを複製したいです。私のレプリケーション設定:

[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

最後の 2 行は永遠に繰り返されます。リモート リポジトリが存在するかどうかに関係なく、ソース Gerrit はリモート リポジトリを認識しないようです。存在しない場合は空のリポジトリを適切に作成しますが、その後も Gerrit はそれを認識しません。

答え1

問題はurl行にあります。ドキュメントの例では、プロトコルが指定されていない URL が表示されていますが、urlパラメータが URL 構文と互換性があることも示されていますgit push。行を次のように変更した後url:

url = ssh://[email protected]:29418/${name}

問題は解決しました。Gerrit がリモート リポジトリを表示し始めます。

関連情報