凹凸棒石接收后钩未触发 [英] gitolite post-receive hook not triggering

查看:82
本文介绍了凹凸棒石接收后钩未触发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的.gitolite.rc文件中,我有:

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

.. then在我已启用的同一文件的ENABLE部分中 repo-specific-hooks:

..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'
    ...,
    ...,
    ...
    ]

现在,在我的本地计算机上的gitolite-admin文件夹中,我拥有:

, 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!

,并在我的gitolite-admin conf文件中进行一些回购:

, 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

我从gitolite-admin进行了commitpush,我可以看到我的message脚本已部署在服务器路径上应放置的位置($ ENV {HOME}/.gitolite/local) ,并设置了可执行的权限.

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.

但是,当我按下repo foo时,没有收到来自我的回显消息 message脚本,它只是一个bash脚本:

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

为什么post-receive没有触发?

如果我理解得很好,则该foo repo中应该有一个符号链接 叫post-receive指向我的message脚本,但没有一个.

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.

推荐答案

正如OP所确认的那样,每个回购挂钩仅可从3.5晚(2013年10月),2014年3.6日(2014年)而不是3.5.x早期的gitolite获得. (2013).

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'是:

  • 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)

因此,这里需要最新版本的gitolite.

So the very latest version of gitolite is needed here.

这篇关于凹凸棒石接收后钩未触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆