gitolite post-receive hook not triggering

偶尔善良 提交于 2019-12-08 04:11:14

问题


In my .gitolite.rc file I have:

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

..then in ENABLE section of the same file I have enabled repo-specific-hooks:

ENABLE => [

# COMMANDS

# These are the commands enabled by default
    'help',
    'desc',
    'info',
    ...,
    ...,
    ...,
    'repo-specific-hooks'
    ...,
    ...,
    ...
    ]

, now, on my local machine inside gitolite-admin folder I have:

gitolite-admin
...
...

└──local/
    └── hooks/
        ├── common/
        └── repo-specific/
            └── message* <-- this one I want to call in a post-receive hook!

, and for some repo in my gitolite-admin conf file:

repo foo
RW+                       =   @all
option hook.post-receive  =   message <-- referencing script I want to call on post-receive

I did commit and push, from gitolite-admin and I can see that my message script got deployed where it should be on the server path ( that $ENV{HOME}/.gitolite/local ), with executable permsission set.

However, when I push to repo foo I don't get echoed message from my message script, which simply is a bash script:

echo "hello from message"
exit 0

Why does that post-receive is not triggering?

Also if I understood well, there should be a symbolic link in that foo repo called post-receive pointing to my message script, and there isn't one.


回答1:


As confirmed by the OP, the per repo hook is only available from gitolite late 3.5 (Oct /2013), 3.6 (2014), not early 3.5.x (2013).

'repo-specific-hooks' was:

  • introduced in commit 62fb317 (gitolite 3.5.3, Oct 2013)
  • formerly tested in commit c0e36b3 (gitolite 3.6, May 2014)
  • debugged in commit b607f55 (gitolite 3.6.1, June 23d 2014)

So the very latest version of gitolite is needed here.



来源:https://stackoverflow.com/questions/24437266/gitolite-post-receive-hook-not-triggering

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