Hook not fired after push
Created by: optikfluffel
Hi. On my gitlab installation the hook I configured is not fired after I pushed into the repo. If I click the Test Hook
button everythings works great. There's also no post receive jobs waiting or anything.
Am I missing something? Do I have to configure more than just adding the url to the hooks for that repo?
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Author Owner
Created by: zzjin
have exact same prblem too. also found nothing in log file.
By Administrator on 2012-08-10T14:31:36 (imported from GitLab project)
By Administrator on 2012-08-10T14:31:36 (imported from GitLab)
- Author Owner
Created by: dzaporozhets
have you tested it with requestb.in?
On Fri, Aug 10, 2012 at 5:31 PM, zzjin notifications@github.com wrote:
have exact same prblem too. also found nothing in log file.
— Reply to this email directly or view it on GitHubhttps://github.com/gitlabhq/gitlabhq/issues/1217#issuecomment-7646145.
By Administrator on 2012-08-10T14:42:10 (imported from GitLab project)
By Administrator on 2012-08-10T14:42:10 (imported from GitLab)
- Author Owner
Created by: optikfluffel
yepp, same thing there, if I click the test button there is a request with all data in it, but if I push to gitlab there's still no request fired..
By Administrator on 2012-08-10T14:46:48 (imported from GitLab project)
By Administrator on 2012-08-10T14:46:48 (imported from GitLab)
- Author Owner
Created by: MichaelKuhinica
I have the same problem here, all I can see is a Timeout::Error exception on resque failed jobs list with the following stacktrace: http://pastebin.com/TZNwrgmC
By Administrator on 2012-08-13T14:47:55 (imported from GitLab project)
By Administrator on 2012-08-13T14:47:55 (imported from GitLab)
- Author Owner
Created by: austinche
I had the same problem and the problem was due to the post-receive file written by gitlab. It tries to run
env -i redis-cli
but my redis-cli is located in /usr/local/bin which is not in the path after env -i. Two methods to solve the problem: symlink redis-cli into /usr/bin or change the post-receive file to useenv -i
which redis-cli``By Administrator on 2012-08-13T23:18:02 (imported from GitLab project)
By Administrator on 2012-08-13T23:18:02 (imported from GitLab)
- Author Owner
Created by: tiagoad
I am having this issue as well
By Administrator on 2012-08-13T23:11:39 (imported from GitLab project)
By Administrator on 2012-08-13T23:11:39 (imported from GitLab)
- Author Owner
Created by: optikfluffel
@austinche
env -i redis-cli
is not the problem in my case, if i type it into the terminal it works.. so symlink doesn't help me =/edit:
I think I found my problem, I use
requirepass
in myredis.conf
can I configure this in gitlab somehow so that it fixes my hooks?By Administrator on 2012-08-14T09:12:25 (imported from GitLab project)
By Administrator on 2012-08-14T09:12:25 (imported from GitLab)
- Author Owner
Created by: MichaelKuhinica
My redis-cli is at /usr/bin and it does not require a password looks like those are different issues
By Administrator on 2012-08-14T12:19:58 (imported from GitLab project)
By Administrator on 2012-08-14T12:19:58 (imported from GitLab)
- Author Owner
Created by: optikfluffel
Maybe it's the same problem and my redis auth isn't the problem yet xD
By Administrator on 2012-08-14T23:49:31 (imported from GitLab project)
By Administrator on 2012-08-14T23:49:31 (imported from GitLab)
- Author Owner
Created by: optikfluffel
I tried around a little and if I change my post-receive-hook that it looks somehow like this:
env -i redis-cli -a myRedisAuthPassword rpush "resque:queue:post_receive" [...]
it works for me. Can I somehow confige Gitlab to use add this to all hooks I create?
By Administrator on 2012-08-15T09:34:42 (imported from GitLab project)
By Administrator on 2012-08-15T09:34:42 (imported from GitLab)
- Author Owner
Created by: dzaporozhets
you can edit GL_PATH/lib/post-receive-hook. We use this file as sample for per-project files
On Wed, Aug 15, 2012 at 12:34 PM, Udo Kramer notifications@github.comwrote:
I tried around a little and if I change my post-receive-hook that it looks somehow like this:
env -i redis-cli -a myRedisAuthPassword rpush "resque:queue:post_receive" [...]
it works for me. Can I somehow confige Gitlab to use add this to all hooks I create?
— Reply to this email directly or view it on GitHubhttps://github.com/gitlabhq/gitlabhq/issues/1217#issuecomment-7751981.
By Administrator on 2012-08-15T10:36:06 (imported from GitLab project)
By Administrator on 2012-08-15T10:36:06 (imported from GitLab)
- Author Owner
Created by: optikfluffel
@randx thanks :) @MichaelKuhinica do you have a resque worker running? is a job added to the queue after a push?
By Administrator on 2012-08-15T10:39:21 (imported from GitLab project)
By Administrator on 2012-08-15T10:39:21 (imported from GitLab)
- Author Owner
Created by: MichaelKuhinica
@optikfluffel Yes, I have a resque worker running and can see the job at the post_receive queue for a while and then it fails with the Timeout::Error exception. Is it possible that some security rule is blocking the post back?
By Administrator on 2012-08-15T14:10:07 (imported from GitLab project)
By Administrator on 2012-08-15T14:10:07 (imported from GitLab)
- Author Owner
Created by: optikfluffel
Maybe it's a problem with your Endpoint you post the request to? Could you provide some information about that?
By Administrator on 2012-08-16T12:03:50 (imported from GitLab project)
By Administrator on 2012-08-16T12:03:50 (imported from GitLab)
- Author Owner
Created by: MichaelKuhinica
I posted it to http://requestb.in/ When I click on test hook I get the request correctly.
By Administrator on 2012-08-16T12:24:23 (imported from GitLab project)
By Administrator on 2012-08-16T12:24:23 (imported from GitLab)
- Author Owner
Created by: optikfluffel
Maybe the user of the Resque worker doesn't have the necessary rights? Or maybe it has no access to your installed gems or so?
By Administrator on 2012-08-16T12:35:43 (imported from GitLab project)
By Administrator on 2012-08-16T12:35:43 (imported from GitLab)
- Author Owner
Created by: MichaelKuhinica
I don't think this is the problem the user that runs resque is the same that runs gitlab. I was looking at some logs and got a new stacktrace that mentions something about resque authentication https://gist.github.com/72331e54636df51da422 Is there some configuration I should set for auth?
By Administrator on 2012-08-16T14:41:30 (imported from GitLab project)
By Administrator on 2012-08-16T14:41:30 (imported from GitLab)
- Author Owner
Created by: optikfluffel
is it an issue with the env variable? see: http://stackoverflow.com/questions/7128752/resque-resque-scheduler-nomethoderror-undefined-method-rpush-for-nilnilclas
By Administrator on 2012-08-16T21:52:33 (imported from GitLab project)
By Administrator on 2012-08-16T21:52:33 (imported from GitLab)
- Author Owner
Created by: mablae
Hey,
facing the same Problem here. "Test Hook" works. After push it does nothing!
Any help appriciated! I am on version "stable" which should be v2.8.2.
The hook was working before the update to 2.8. When I hit the button in gitlab, hook is fired.
When pushing to repo, not.
By Administrator on 2012-08-27T13:52:35 (imported from GitLab project)
By Administrator on 2012-08-27T13:52:35 (imported from GitLab)
- Author Owner
Created by: khobbits
Just had a similar problem here, binary wasnt installed to a folder in env
By Administrator on 2012-10-18T15:01:22 (imported from GitLab project)
By Administrator on 2012-10-18T15:01:22 (imported from GitLab)
- Author Owner
Created by: rahul286
I am facing same issue.
Test hook works but post-receive hook doesn't fire :|
By Administrator on 2012-10-29T15:17:33 (imported from GitLab project)
By Administrator on 2012-10-29T15:17:33 (imported from GitLab)
- Author Owner
Created by: SpikedCola
Same problem :(
By Administrator on 2012-11-19T03:59:29 (imported from GitLab project)
By Administrator on 2012-11-19T03:59:29 (imported from GitLab)
- Author Owner
Created by: livedata
Since i'm using freebsd, repo path in post-receive hook was wrong. This is what i've seen using redis-cli monitor:
1357348918.113866 "rpush" "resque:gitlab:failed" "{"failed_at":"2013/01/05 01:21:58 UTC","payload":{"class":"PostReceive","args":["usriksik/test"
so... usriksik/test instead of iksik/test - this usr appears from full path to repositories /usr/home/git/repositories
repo_path=
pwd | sed "s/\/usr//"
solves my problem ;-)
By Administrator on 2013-01-05T01:22:35 (imported from GitLab project)
By Administrator on 2013-01-05T01:22:35 (imported from GitLab)
- Author Owner
Created by: ghost
Same problem here. I have a job in the queue, but no resque workers running. Should I have?
By Administrator on 2013-01-07T23:06:00 (imported from GitLab project)
By Administrator on 2013-01-07T23:06:00 (imported from GitLab)