Thursday, August 23, 2018

Configure Gerrit git repositories replication using replication plugin


If you want to setup the replication of Gerrit repositories to a remote server like git then use following steps:

Perquisites

Install replication plugin if it is not installed(refer this link "http://gerrit-ur:8080/#/admin/plugins/" for verify replication plugin.


Steps:

1) Add below mentioned configuration in "gerrit.config" file.
[plugins]
        allowRemoteAdmin = true  
 2) Create replication.config file with below mentioned details if not exists.

[remote "gerrit_replication"]

  url = git@git-url:groupName/${name}.git
  push = +refs/heads/*:refs/heads/*
  push = +refs/tags/*:refs/tags/*
  timeout = 300
  threads = 3
  remoteNameStyle = dash
  authGroup = Administrators

3) Restart gerrit server.

4) Use these command if you want to start replication. 
ssh -p 29418 usename@gerrit-server gerrit plugin reload replication 
ssh -p 29418 usename@gerrit-server replication start --wait --all

5) Check replication.log file for replication status.

No comments:

Post a Comment