3

I have gitolite configured on my repo. I see 2 copies of the hooks as documented in the gitolite literature. I would like the server-side hook post-receive to send email when someone does a push to the repo. I am using git-notifier. However, nothing happens when I push. I have modified both copies of the hooks, and I added a line to create a tmp file. After I push my changes to the repo, no tmp file is there and no email is sent. Any help is greatly appreciated. Thanks.

Cascabel
  • 479,068
  • 72
  • 370
  • 318
user561638
  • 1,299
  • 3
  • 15
  • 26
  • As the gitolite user, verify that the hook is present and executable in the repositories in question. Instead of a temp file, simply echo output - it will be forwarded back to the pushing client. (And make sure to do it at the very very top.) – Cascabel Feb 11 '11 at 00:10
  • 1
    I've added the `git` tag to your question - I never saw it until you posted your not-a-question rant today, since it wasn't properly tagged. I think if you take the time to ask clear questions, and have a little bit of patience, you'll find that SO can be a great help to you - though of course, no replacement for reading manpages, using google, and trying things on your own. – Cascabel Feb 11 '11 at 00:12
  • Thanks Jefromi. I have tried all of your suggestions to get help. – user561638 Feb 14 '11 at 16:59
  • 1
    I changed my touch command to echo "inside post.receive hook". I modified a file on master, committed it and pushed it to the origin/repo. I also verified that the hooks are present in the repository and executable. Still no luck. – user561638 Feb 15 '11 at 20:33
  • anyone else care to take a stab at helping me please???? :-) – user561638 Feb 17 '11 at 21:47
  • accidently came across the cause of my problem. I have sym links to /usr/local/share copies of the gitolite hooks(this was setup by default). I changed the sym links to point to /home/git/.gitolite/hooks/common/*, and the hooks started firing. I figured this out because a branch new repo had the sym links pointing here. All of my other repos existed when I migrated from gitosis to gitolite. Perhaps the migration doc or script needs to be changed to reflect this? – user561638 Mar 07 '11 at 21:47
  • You should post this as an answer to your question and except it :) – asm Aug 22 '11 at 17:30

1 Answers1

1

You should run the following commands:

gitolite/src/gl-system-install
gl-setup

The only place you have to modify the hooks is on gitolite/hooks/common. The above commands takes care of updating the hooks in all repositories.

gforcada
  • 2,498
  • 17
  • 26