Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For some reason my post-received hook never executes. It's a simple two liner diagnostic script: echo "test" && touch /tmp/test. When I do git push origin master nothing happens. Does any-one know what am I doing wrong?

share|improve this question
Have you ensured that the script is executable (and if it's a shell script, properly formatted with a valid #!interpreter line)? This is the source of 99% of the "my post-receive hook doesn't work" complaints :) – voretaq7 May 11 '10 at 16:52

If you're using http, know that HTTP does not support hooks and you could ssh:/

share|improve this answer

Make sure that the script file itself is actually executable.

chmod ug+x .git/hooks/post-receive

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.