Setting up Github post-receive webhook with private Jenkins and private repo
- by Joseph S.
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.