Setting up Github post-receive webhook with private Jenkins and private repo

Posted by Joseph S. on Server Fault See other posts from Server Fault or by Joseph S.
Published on 2012-03-17T13:54:19Z Indexed on 2013/11/08 21:59 UTC
Read the original article Hit count: 709

Filed under:
|

I'm trying to set up a private GitHub project to send a post-receive request to a private Jenkins instance to trigger a project build on branch push. Using latest Jenkins with the GitHub plugin.

I believe I set up everything correctly on the Jenkins side because when sending a request from a public server with curl like this:

curl http://username:password@ipaddress:port/github-webhook/

results in:

Stacktrace: net.sf.json.JSONException: null object

which is fine because the JSON payload is missing. Sending the wrong username and password in the URI results in:

Exception: Failed to login as username

I interpret this as a correct Jenkins configuration. Both of these requests also result in entries in the Jenkins log. However, when pasting the exact same URI from above into the Github repository Post-Receive URLs Service Hook and clicking on Test Hook, absolutely nothing seems to happen on my server. Nothing in the Jenkins log and the GitHub Hook Log in the Jenkins project says Polling has not run yet.

I have run out of ideas and don't know how to proceed further.

© Server Fault or respective owner

Related posts about jenkins

Related posts about github