I am trying to migrate from v2 to v3 of gitolite. The old way of doing a server-side commit message check was to put the check in a repo specific hook in myrepo.git/hooks/update.secondary
In v3 of gitolite, they advise the check to be put in a VREF. The documentation is a little confusing and I am hoping for clarification.
I have added the following in /home/git/.gitolite.rc
LOCAL_CODE => "$ENV{HOME}/.gitolite/our_hooks",
In my our_hooks directory, I created a VREF folder and put my old update.secondary script in there. In my gitolite-admin/conf/gitolite.conf file, I added the following to the repository I want the script to execute on:
repo myrepo
RW = @my_developers
- VREF/update.secondary = @my_developers
When I try to push, I get a notice that the VREF/update.secondary can not be found. If I change to
repo myrepo
RW = @my_developers
- /home/git/.gitolite/our_hooks/VREF/update.secondary = @my_developers
I don't get any complaints but the hook doesn't appear to run at all.
Am I missing the boat on how to get an additional update check to run using gitolite?
The documentation around this is a little confusing, so hopefully this will help others trying to get a chained update hook working with gitolite v3.
Everything I've done above is correct, the missing piece was were my update.secondary script needed to reside.
In the gitolite-admin/conf/gitolite.conf, the configuration should look like:
repo myrepo
RW = @my_developers
- VREF/update.secondary = @my_developers
Then there is a VREF directory in the GL_BINDIR directory. Place your executable update.secondary file in that directory.
The GL_BINDIR is the directory that contains the gitolite binary you ran in order to run: gitolite setup
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With