Gitlab CE (FOSS) global hooks directory help

I recently installed Gitlab CE using the source installation. I want to put in a global hook for repositories and from the documentation, for from source installations, we want to put the hooks at /home/git/gitlab-shell/hooks.

I have created the necessary directories, and their owned by git:

ls -lart /home/git/gitlab-shell/hooks
total 3
drwxr-xr-x  2 git  git  3 Nov  1 10:31 post-receive.d
drwxr-xr-x  2 git  git  3 Nov  1 10:32 pre-receive.d
drwxr-xr-x  5 git  git  5 Nov  1 10:32 .
drwxr-xr-x  3 git  git  3 Nov  1 10:32 ..
drwxr-xr-x  2 git  git  3 Nov  1 10:33 update.d
find /home/git/gitlab-shell/hooks -type f -exec ls -l {} \;
-rwxr--r--  1 git  git  439 Nov  1 10:32 /home/git/gitlab-shell/hooks/pre-receive.d/pre-receive
-rwxr--r--  1 git  git  438 Nov  1 10:31 /home/git/gitlab-shell/hooks/post-receive.d/post-receive
-rwxr--r--  1 git  git  139 Nov  1 10:33 /home/git/gitlab-shell/hooks/update.d/update

I have a few dummy files that just print Hello World. However, I do not see my hooks getting executed.

How could I go about debugging this?

  • Mike D.

It turns out that gitaly doesn’t like symlinks, and my /home/git was actually a symlink. Turning that to a hard link solved the issue.