2

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?

1 Answer 1

3

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

3
  • 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, 2010 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, 2010 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, 2010 at 6:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .