Failed to connect to Github repository

88 views
Skip to first unread message

Prasu S

unread,
Apr 29, 2016, 9:09:20 AM4/29/16
to Jenkins Users
I'm trying to connect from Jenkins(which is on windows server) to Github repository(this is in cloud) . I received this error: Failed to connect to repository :failed to connect to <repo. url> using credentials(status=403). Please help me resolve this issue. It's urgent.


Thank You,
P !!

Mark Waite

unread,
Apr 29, 2016, 9:25:28 AM4/29/16
to jenkins...@googlegroups.com
Be sure that you've used the "Credentials" link from the top of the Jenkins UI to add a new RSA private key for your user, and that you've confirmed separately from a git command line on that Windows machine that the credentials allow you access to the github repository.  Use that credential in the repository section of the job definition.

If that still doesn't work, then it may be that you are running Jenkins as a service on Windows and are encountering a known bug in the Jenkins git plugin.  Refer to https://issues.jenkins-ci.org/browse/JENKINS-20356 for more information on that bug.

You could check if "running as a service" is the problem by stopping the service you're currently running, and starting Jenkins on that machine with "java -jar jenkins.war".  Define a job in that fresh running Jenkins, and see if it can read from that repository.

If that bug is the problem, you could enable the JGit implementation (using "Manage Jenkins" -> "Configure System" -> "Git" -> "Add Git") and try the JGit implementation from your Jenkins running as a Windows service.

Thanks,
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/c45809e1-b73e-4c51-a906-b403ed89ab28%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Prasu S

unread,
May 2, 2016, 2:25:12 PM5/2/16
to Jenkins Users
Thank you  Mark for quick response !!! I tried to connect github repository from Jenkins windows machine using github credentials but no luck. Here is the error:

fatal: unable to access " <github repository> : Failed connect to github.com:443; No error.  Do you I have to look into any Github settings?

Thanks,
P

Mark Waite

unread,
May 2, 2016, 2:58:21 PM5/2/16
to Jenkins Users
I doubt it is GitHub settings.  Maybe you're behind some form of proxy server and need to configure the proxy settings of your Windows machine so that it can connect to github?

Another alternative would be to switch from using https protocol to using ssh protocol (g...@github.com:YourUserName/repository_name)

Mark Waite

Reply all
Reply to author
Forward
0 new messages