Issue
-
Receiving "(Failed to connect to repository : Failed to connect to … using credentials (status = 401))" errors when trying to… (not sure what jenkins/plugin is doing commit, poll, etc…)
-
The Git Plugin is unable to authenticate with RHEL6
Resolution
Ultimately, you need to be running with git => 1.7.9.
Red Hat makes a version of git > 1.7.9 available through its Developer Toolset. The solution is to install RHT developer toolset, which includes git 1.8.x:
-
Alternatively install the Red Hat Software Collection (RHSC) which includes the Developer Toolset and Git 1.9.4.
Root Cause
RHEL 6.x includes git client version 1.7.1 by default. This version of git was shipped in April, 2010. The Jenkins git-plugin requires at least git version 1.7.9 but preferably git 1.8.x or higher. One issue with this older version of git is that it is not compatible with Jenkins’s git-plugin and the credentials-api.