using gitolite VREFs for update hook

我只是一个虾纸丫 提交于 2019-12-04 07:32:46

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

VonC

To add to the (upvoted) OP nathasm's answer, I have no problem using a LOCAL_CODE variable in my .gitolite.rc file, as mentioned in the section "alternate location" of "customising gitolite".

However, I never managed to use an environment variable.

In other words, this won't work:

LOCAL_CODE                  => "$ENV{HOME}/.gitolite/our_hooks",

But this will:

LOCAL_CODE                  => "/home/git/.gitolite/our_hooks",

Using the full path means that any VREF or hooks declared in /home/git/.gitolite/our_hooks/VREF will be recognized

repo myrepo
  RW = @my_developers
  - VREF/update.secondary = @my_developers
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!