我有Ubuntu:
Distributor ID: Ubuntu
Description: Ubuntu 15.10
Release: 15.10
Codename: wily
以及gitolite:
gitolite3 3.6.3-1 (Debian) on git 2.5.0
我在配置文件中有以下几行:
repo livesearch
option hook.post-receive = livesearch
RW+ = @commonwrite
R = @commonread
请跟随gitolite-admin/local/hooks/repo-specific/livesearch文件中的数据:
#!/bin/sh
/bin/sh /var/lib/gitolite3/.gitolite/local/hooks/repo-specific/common seofilters
如果我用这样的钩子文件提交到livesearch仓库,会得到以下结果:
remote: hooks/post-receive: 18: hooks/post-receive: hooks/post-receive.h00-livesearch: not found
但是!!!当我从文件中排除了shebang(#!/bin/sh)后,一切都正常工作了!!!
在两种情况下,我都在远程拥有:
lrwxrwxrwx 1 git www-data 65 Apr 13 13:23 post-receive.h00-livesearch -> /var/lib/gitolite3/.gitolite/local/hooks/repo-specific/livesearch
链接没问题!
另外,我有其他钩子,可以正常与 shebang 配合使用!
只是新的钩子不能与 shebang 配合使用,但我没有更新什么…
问题可能出在哪里呢?