1

I'm having massive issues right now trying to get a gitolite hook to go.
I've put the file in .gitolite/hooks/common/ and I have ran the gitolite setup, and when I push to a repo, nothing happens.

I have checked the permissions 755 on the file. It's owned by git. I'm fully stumped.
So far I like gitolite, however so far for me, hooks are killing me.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Mike
  • 19
  • 3

1 Answers1

0

Try to modify the hook as published by Gitolite in your ~/repositories/yourRepo/hooks, in order to:

  • simplify it
  • have a simple echo in it
  • make it non-blocking

That way, you will make sure if the issue actually comes from that hook or not.

Also don't hesitate to upgrade your gitolite version to the latest one.


The OP mike tries the VREF route and finds out that:

turns out the issue was in my config file where I call the hook.
We have a group called devs and admins: I needed to make sure I was referencing the right group.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I changed the hook to echo a simple message. I'm not certain where to look for the echoed text. I pushed to the repo, checked logs, and didn't see the text. Not sure if the hook didn't run or I don't know here to look. Where you say 'non-blocking', I'm not entirely certain what you mean. Also, I updated gitolite from v3.5.2 -> v3.5.3 – Mike Jan 17 '14 at 18:43
  • @Mike you should see it in the standard output when you push to it. If you don't, then it isn't called somehow. What kind of hook it is? An update one? An update one, for instance, would be taken by Gitolite itself. And I prefer setting up VREF rather than hooks: http://stackoverflow.com/a/15941289/6309 and http://stackoverflow.com/a/10888358/6309 – VonC Jan 17 '14 at 20:13
  • I'm using update.secondary chaining method to try and run a very simple script after I push to a repo. Looking at the links you provided I'm going to look into the VREF route and see if that is more viable. – Mike Jan 20 '14 at 22:11
  • @Mike wait "update.secondary"? Are you using an old gitolite V2? Those are called VREF in gitolite V3 now: http://gitolite.com/gitolite/vref.html – VonC Jan 21 '14 at 06:13
  • I realized there was an issue with chaining, so I looked into the VREF route. Yesterday I looked at VREFs and just normal hooks. I set the LOCAL_CODE path and within there I have hooks/common along with a VREF directory. I have a feeling there is some value I need to set or I'm missing something in the config in order to get hooks firing. I don't think it was intended to be this cumbersome. Hopefully a fresh new day will help. – Mike Jan 21 '14 at 17:55
  • @Mike don't forget to make your VREF scripts executable. – VonC Jan 21 '14 at 20:03
  • So, turns out the issue was in my config file where I call the hook. We have a group called devs and admins, I needed to make sure I was referencing the right group. Thanks VonC for helping me out. I got the vref working :) – Mike Jan 21 '14 at 23:33
  • @Mike sounds great! I have included your conclusion in the answer for more visibility. – VonC Jan 22 '14 at 06:42