title: Custom post-receive hook with gitlab
body: <p>I am trying to set up a custom post-receive hook using gitlab</p>
  
  <p>I am following their documentation 
  <a href="http://doc.gitlab.com/ce/hooks/custom_hooks.html#custom-git-hooks" rel="nofollow">here</a></p>
  
  <p>I have an executable post-receive file in the custom_hooks folder with the following code:</p>
  
  <pre><code> !/bin/bash
   echo "post-receive firing | wall
   git pull
  </code></pre>
  
  <p>If I run this file with:</p>
  
  <pre><code> ./post-receive
  </code></pre>
  
  <p>It works fine. It does not appear to fire at all when a push is made to the gitlab repo.</p>
  
  <p>This is the first time I have ever tried web hooks of any kind so I am a little lost.</p>
  
  <p>a) I have the above script on my remote webserver, inside the .git/custom_hooks folder, is this correct?</p>
  
  <p>b) Do I need to do anything in the repo?</p>
  
  <p>c) In the documentation, it specifies I should set permissions on the file so it is owned by the 'git' user. I have no git user on the webserver... all other git related files are owned by my user or root.</p>
  
  <p>So assuming I am doing something completely wrong here, can someone please put me out of my misery and suggest a sane way to auto push to a web server whenever I push to gitlab from a local machine. I feel like I have spent some time looking for a way to do this and solutions seem to be complete overkill (cronjob running every few seconds...) or like the above, do not seem to work. Or at least I seem incapable of making them work. </p>
  
  <p>Surely this is a straightforward task...</p>