master TOC | chapter TOC | support
For reasons given in the 'discussion' section later, the mirroring process will never create a repo on the receiving side. It has to exist, and be willing to accept pushes from the master.
In particular, this means that repositories created by end-users ("wild" repos) need to be explicitly created on the mirror (preferably by the same user, assuming his ssh key works there as well). Once the repo has been created on the slave, subsequent pushes will be mirrored correctly.
This process will only mirror your git repositories, using git push
--mirror. It will not mirror log files, and repo-specific files like
gl-creater and gl-perms files, or indeed anything that was manually
created or added (for example, custom config entries added manually
instead of via gitolite).
None of these affect actual repo contents of course, but they could be important, (especially the gl-creator, although if your wildcard pattern had "CREATOR" in it you can recreate those files easily enough anyway).
This document has been tested using a 3-server setup, all installed using the non-root method (see doc/1-INSTALL.mkd). However, the process is probably not going to be very forgiving of human error -- like anything that is this deep in "system admin" territory, errors are likely to be costly. If you're the kind who hits enter first and then thinks about what he typed, you're in for some fun times ;-)
On the plus side, everything we do is done using git commands, so things
are never really lost until you do a git gc.
Mirroring has not been, and will not be, tested with gitolite installed using the deprecated 'from-client' method. Please use one of the other methods.
Also, this has not been tested with smart-http. I'm not even sure it'll work; http is very fiddly to get right. If you want mirroring, at least your server-to-server comms should be over ssh.
Finally, this method uses repo-specific git config variables to store
the mirroring information. Please read the WARNING in the
documentation on git config commands if you wish to delete one
of those lines.