Testing the mirror hook
On the Gerrit server
-
Set the environment variable
GIT_DIR
to the absolute path to the Gerrit repository:export GIT_DIR=GERRIT_SITE/git/repoName.git
where GERRIT_SITE represents the root directory of your Gerrit server.
-
From the
GERRIT_SITE
directory, issue the command:./hooks/change-merged
-
Check whether the hook displays the message that indicates successful mirroring:
GConn Hook HTTP response: mirror from http://GerritHost.com/repoName.git to //graphDepot/repoName.git
- If there are problems, see Troubleshooting Gerrit one-way mirroring.