Why am I unable to authenticate with the Git Plugin on Red Hat Enterprise Linux?

Article ID:204380720
1 minute readKnowledge base

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

Environment

  • git < 1.7.9

  • Red Hat Enterprise Linux

  • CloudBees Jenkins Enterprise

  • Git Plugin

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:

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.

This article is part of our Knowledge Base and is provided for guidance-based purposes only. The solutions or workarounds described here are not officially supported by CloudBees and may not be applicable in all environments. Use at your own discretion, and test changes in a safe environment before applying them to production systems.