Testing the mirror hook

On the Gerrit server

  1. 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.

  2. From the GERRIT_SITE directory, issue the command:

    ./hooks/change-merged

  3. 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

  4. If there are problems, see Troubleshooting Gerrit one-way mirroring.