I'm using Hudson as my CI server and I'm trying to get my commits to trigger a build. When I was using gitosis I just had a post-receive that ran a

curl -u gituser:password http://my.hudson.url/project/?token=someToken

I can't seem to find out how to run commands such as this with Github, it only appears to support certain services by sending a POST to a particular url. The reason I'm using curl is for the user authentication. I'm not sure how I can accomplish this with Github.

Has anyone used a similar setup at all?

link|improve this question

80% accept rate
feedback

1 Answer

up vote 3 down vote accepted

Add a build user to your hudson setup, add privileges

In your github service hook, add user credentials in POST-call

http://USER:PASS@SERVER/job/PROJECT/build?token=TOKEN

link|improve this answer
will that token make it through in a POST call? I always wondered what happens with GET params placed in a POSt call – brad Aug 4 '10 at 15:43
worked like a charm, thx so much! I had no idea you could pass uname/pwd in a url – brad Aug 6 '10 at 3:19
The "GET" parameters are URL parameters that can be used with any type of URL request. POST is often used to allow all of the parameters to be pasted in the body (then they don't show up in browser histories or URL logs). But for simple runtime parameters that you wish to be easy to change, it is a good way to do things. – Walter Sep 5 '10 at 6:43
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.