Apologies if this isn't the right stackexchange.
I have a GitLab install. It was installed over the top of a gitolite install that was only a few days old, and I assume this non-standard setup is at the root of my problem, but I cannot pin it down.
The problem is straightforward: post-receive hooks are not fired. This prevents 'project activity' appearing in GitLab. The problem looks like:
$ git push #... error: cannot run hooks/post-receive: No such file or directory
The post-receive hook/symlink exists and is executable:
-rwxr-xr-x 1 git git 470 Oct 3 2012 .gitolite/hooks/common/post-receive lrwxrwxrwx 1 git git 45 Oct 3 2012 repositories/project.git/hooks/post-receive -> /home/git/.gitolite/hooks/common/post-receive
It's Executable By GitLab
The gitlab user can execute the script (I have removed the
/dev/null redirect and fed in blank input to get an 'OK' as output):
sudo su - gitlab -c /home/git/.gitolite/hooks/common/post-receive OK
GitLab Can Find It
GitLab is looking for hooks in the correct location:
$ grep hooks /srv/gitlab/gitlab/config/gitlab.yml hooks_path: /home/git/.gitolite/hooks/
$ bundle exec rake gitlab:app:status RAILS_ENV=production # ... /home/git/.gitolite/hooks/common/post-receive exists? ............YES
GitLab Runs As Correct User
The GitLab software is being run by the gitlab user:
$ ps U gitlab PID TTY STAT TIME COMMAND 3650 ? Sl 0:59 unicorn_rails master -c /srv/gitlab/gitlab/config/unicorn.rb -E production -D 3671 ? Sl 0:43 unicorn_rails worker -c /srv/gitlab/gitlab/config/unicorn.rb -E production -D 3674 ? Sl 0:42 unicorn_rails worker -c /srv/gitlab/gitlab/config/unicorn.rb -E production -D # ...
env -i line in the hook is commonly cited as an issue. I think that would occur after this problem, but for completeness,
redis-cli is found OK:
$ env -i redis-cli redis>
I've run out of debugging ideas on this one. Does anybody have any suggestions?