Jenkins and Git Hub Service Hook Failure

243 views
Skip to first unread message

Vitorrio Brooks

unread,
Dec 13, 2013, 3:41:37 PM12/13/13
to jenkins...@googlegroups.com
Hi Guys,

I'm new to Jenkins, but I've created a few jobs before using the GitHub Jenkins hook, so that builds kick off when a commit to Jenkins is made. However, after creating some new jobs, using the same service hook in Git Hub, the commit no longer kicks off the builds. 

On the Jenkins server, using netcat, I can see the XML come in when a commit is made to the branch. I've also double verified that the "build when a push is made to git hub," is selected on the build job in Jenkins, and I've also verified that the service hook is working, Wondering if there are any obvious known issues I can check, that other users have ran into. 

Marius Gedminas

unread,
Dec 15, 2013, 6:22:29 AM12/15/13
to jenkins...@googlegroups.com
Maybe https://issues.jenkins-ci.org/browse/JENKINS-10263

Marius Gedminas
--
Power corrupts, but we need electricity.
signature.asc

Vitorrio Brooks

unread,
Dec 16, 2013, 12:45:03 PM12/16/13
to jenkins...@googlegroups.com
Hi Marius,

Thanks for the link, it was informative. We aren't using XSS protection, so I don't think this issue applies. I've also validated the JSON to make sure that there was nothing out of place, in regards to the structure of the payload from the POST hook. 

Still no luck getting the job to fire off. 

jpd4nt

unread,
Dec 17, 2013, 10:59:48 AM12/17/13
to jenkins...@googlegroups.com
Hi Vitorrio.

What Version of Jenkins are you using?

What Version of Github module you using?

I have created a new logger with:
com.cloudbees.jenkins.GitHubWebHook - log level All
com.cloudbees.jenkins.GitHubPushTrigger - log level All

Allowed me to see what's going on for Github hooks

Vitorrio Brooks

unread,
Dec 17, 2013, 2:09:30 PM12/17/13
to jenkins...@googlegroups.com
Hi JP,

We're using Jenkins version 1.541, with the GitHub plugin version 1.8, also Jenkins Git Plugin version 2.0 is installed. I'll definitely look into the logger, as we need some more insight into the issue. At the moment, I'm trying to test with the "Let Jenkins auto-manage hook URLs". When I enter my credentials to test with, I get an Error:

java.io.IOException: Server returned HTTP response code: 401 for URL: https://api.github.com/user
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1626)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
	at org.kohsuke.github.Requester.parse(Requester.java:298)
	at org.kohsuke.github.Requester._to(Requester.java:175)

It looks like it's not handling the 401 response correctly, when trying to authenticate with basic authentication. If I curl: curl -u "my_username" https://api.github.com, then I'm prompted for a password and everything works fine.

On Friday, December 13, 2013 3:41:37 PM UTC-5, Vitorrio Brooks wrote:

Vitorrio Brooks

unread,
Dec 27, 2013, 1:26:18 PM12/27/13
to jenkins...@googlegroups.com
Thanks everyone for the suggestions. The issue simply turned out to be that I needed to add the an ssh key to the user that was doing all the deploys. Didn't need the deploy keys or multiple RSA keys for each account. Everything is working as expected now. I do appreciate the help. Turning on logging for the web hook/push trigger made all the difference. 


On Friday, December 13, 2013 3:41:37 PM UTC-5, Vitorrio Brooks wrote:
Reply all
Reply to author
Forward
0 new messages