I have GitLab CE 8.9.0 running on a local server but I'm having trouble with the custom hooks not running. There's no lack of questions here with similar issues, however the large majority appear to be out of date, mostly regarding native git hooks and not GitLab's "custom hooks". I've read the documentation from GitLab but am still having similar issues. My set up looks like this:
$ pwd
/var/opt/gitlab/git-data/repositories/[redacted]/[redacted].git
$ ls -l custom_hooks/
total 4
-rwxr-xr-x 1 git git 127 Jun 22 13:15 post-receive
$ cat custom_hooks/post-receive
#!/bin/sh
git --work-tree=/var/www/html/~dev/[redacted] --git-dir=/var/opt/gitlab/git-data/repositories/[redacted]/[redacted].git checkout -f
I'm able to run the script manually and see the expected results:
$ whoami
git
$ pwd
/var/opt/gitlab/git-data/repositories/[redacted]/[redacted].git/custom_hooks
$ ./post-receive
$
Any ideas of why it's not running?