The default Git that ships with older versions of RedHat-derivates such as (Centos 6, Oracle Linux 6 and of course RedHat 6 itself) may be quite old. If it is a version such as 1.7.1
or earlier, you won't be able to use git
with other tools that requirer newer versions such as Jenkins. Below are the steps to install (or upgrade to) a newer version of git
. Thanks to Tim for the original article here.
The following should be performed as a root
user or with sudo
.
If an older Git is already installed, run this to remove it:
yum remove git -y
Install the prerequisite packages and remove the any current Git installation.