266

I used the usual:

yum install git

It did not install the latest version of git on my CentOS 6. How can I update to the latest version of git for CentOS 6? The solution can be applicable to newer versions of CentOS such as CentOS 7.

2
  • 13
    Yes, it is. It's entirely within bounds to ask a question and answer it when it's useful info that hasn't been addressed. May 14, 2014 at 22:02
  • 1
    Without using external repos to upgrade Git, you can try to use yum shell commands. Here's how I've upgraded from git 1.8 to git 2.24: serverfault.com/a/1045216/91648
    – Noam Manos
    Dec 6, 2020 at 17:16

15 Answers 15

403

You can use WANDisco's CentOS repository to install Git 2.x: for CentOS 6, for CentOS 7

  1. Install WANDisco repo package:

    yum install http://opensource.wandisco.com/centos/6/git/x86_64/wandisco-git-release-6-1.noarch.rpm
    - or -
    yum install http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-1.noarch.rpm
    - or -
    yum install http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm
    
  2. Install the latest version of Git 2.x:

    yum install git
    
  3. Verify the version of Git that was installed:

    git --version
    

As of 02 Mar. 2020, the latest available version from WANDisco is 2.22.0.

16
  • 9
    This answer must be applied. Already applied answer with --disablerepo=base,updates doesn't work for me.
    – Kirby
    Aug 12, 2016 at 10:48
  • @Kirby Make sure that wandisco-git.repo exists in /etc/yum.repos.d and has enabled=1 in it. Aug 12, 2016 at 12:40
  • 6
    This is the one that worked for me. Much simpler than the accepted answer.
    – Ben Watson
    Sep 11, 2017 at 9:59
  • 1
    As of Feb 2019, this repo seems to have stopped getting updates: latest git is v2.20.1 but the repo has only v2.18.0
    – IanB
    Feb 15, 2019 at 0:28
  • 1
    the pgp key isn't available via https, can anyone else verify it? Mar 15, 2019 at 19:11
134

Having a look at the blog here I found the solution in one of the comments. Make sure you got the rpmforge repository added to your CentOS yum and just run the flowing command:

yum --disablerepo=base,updates --enablerepo=rpmforge-extras install git

If you already have git installed then use:

yum --disablerepo=base,updates --enablerepo=rpmforge-extras update git

Related question(s):

  1. Facing issues while upgrading git to latest version on CentOS 6.4

Note update:

Thanks to Anthony Hatzopoulos, for git v1.8x you'll need to use git18 as in:

yum --disablerepo=base,updates --enablerepo=rpmforge-extras install git18 

Note update 2:

Also thanks to @Axlrod for the below hint and @Hiphip for the feedback:

Change the rpmforge.repo file to have rpmforge-extras to enabled, yum update git. Otherwise it complained about dependency problems.

Note update 3:

Installing a specific version of git say 2.x I found this nice and easy-to-follow guide on how to download the GIT source and compile it yourself (and install it). If the accepted answer does not give you the version you want, try the following instructions:

http://tecadmin.net/install-git-2-0-on-centos-rhel-fedora/

(And pasted/reformatted from above source in case it is removed later)

Step 1: Install Required Packages

Firstly we need to make sure that we have installed required packages on your system. Use following command to install required packages before compiling Git source.

# yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
# yum install  gcc perl-ExtUtils-MakeMaker

Step 2: Uninstall old Git RPM

Now remove any prior installation of Git through RPM file or Yum package manager. If your older version is also compiled through source, then skip this step.

# yum remove git

Step 3: Download and Compile Git Source

Download git source code from kernel git or simply use following command to download Git 2.0.4.

# cd /usr/src
# wget https://www.kernel.org/pub/software/scm/git/git-2.0.4.tar.gz
# tar xzf git-2.0.4.tar.gz

After downloading and extracting Git source code, Use following command to compile source code.

# cd git-2.0.4
# make prefix=/usr/local/git all
# make prefix=/usr/local/git install
#
# echo 'export PATH=$PATH:/usr/local/git/bin' >> /etc/bashrc
#  or
# echo 'export PATH=$PATH:/usr/local/git/bin' > /etc/profile.d/git.sh
#
# source /etc/bashrc

HINT 1: Updated method of adding compiled git bin directory to bashrc. Because echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc used "" instead of '', it would expand the current session's value for $PATH instead of keeping it as a variable, and could adversely affect the entire system. At the minimum, it should use '' instead of "" and should really be a separate script in /etc/profile.d/

HINT 2 (@DJB): /usr/local/git/bin before $PATH, since the older version of git was already on $PATH: export PATH=/usr/local/git/bin:$PATH

Step 4. Check Git Version

One completion of above steps, you have successfully install Git in your system. Let use following command to check git version

# git --version

git version 2.0.4

I also wanted to add that the "Getting Started" guide at the GIT website also includes instructions on how to download and compile it yourself:

http://git-scm.com/book/en/v2/Getting-Started-Installing-Git

9
  • 3
    This only got me git v1.7x. For git v1.8x you'll need to use git18 as in yum --disablerepo=base,updates --enablerepo=rpmforge-extras install git18 Jul 22, 2014 at 20:32
  • 2
    didn't work for me, I had to change the rpmforge.repo file to have rpmforge-extras to enabled, and then do yum update git. Otherwise it complained about dependency problems. (since it needed packages from base)
    – Alex R
    Jul 31, 2014 at 12:38
  • 5
    Error getting repository data for rpmforge-extras, repository not found - 1st cmd on cent6.6
    – Nithin
    Nov 28, 2014 at 6:50
  • 2
    Running yum --disablerepo=base,updates --enablerepo=rpmforge-extras list | grep git only shows Git 1.7.12 for me on Centos 6.6. Perhaps they've removed "git18"? Dec 28, 2014 at 8:01
  • 30
    wiki.centos.org/AdditionalResources/Repositories/RPMForge RPMForge/RepoForge is a dead project. It is not maintained. DO NOT USE.
    – Maoz Zadok
    Aug 16, 2016 at 6:39
109

Rackspace maintains the ius repository, which contains a reasonably up-to-date git, but the stock git has to first be removed.

CentOS 6 or 7 instructions (run as root or with sudo):

# retrieve and check CENTOS_MAIN_VERSION (6 or 7):
CENTOS_MAIN_VERSION=$(cat /etc/centos-release | awk -F 'release[ ]*' '{print $2}' | awk -F '.' '{print $1}')
echo $CENTOS_MAIN_VERSION
# output should be "6" or "7"

# Install IUS Repo and Epel-Release:
yum install -y https://repo.ius.io/ius-release-el${CENTOS_MAIN_VERSION}.rpm
yum install -y epel-release 

# re-install git:
yum erase -y git*
yum install -y git-core

# check version:
git --version
# output: git version 2.24.3

Note: git-all instead of git-core often installs an old version. Try e.g. git224-all instead.

The script is tested on a CentOS 7 docker image (7e6257c9f8d8) and on a CentOS 6 docker image (d0957ffdf8a2).

4
  • Nice! Those rpmforge compile instructions did not work -- Can't locate ExtUtils/MakeMaker.pm in @INC
    – Nakilon
    May 17, 2018 at 23:53
  • This one worked for me today for the most recent centos, the others were outdated. May 25, 2018 at 15:41
  • 3
    This is the only method on this page that I've tried (as of 7 September 2018) that ensures an up-to-date 2.x git for CentOS and also ensures a compiled git-credential-libsecret is installed, which is the safest os-native means for storing git credentials, e.g. for http[s] URLs. The currently accepted answer at the time of writing (stackoverflow.com/a/21820716/407170) does not do these things and requires you to compile yourself. Sep 8, 2018 at 0:56
  • If you want to automate this using Ansible, I recommend checking out github.com/iuscommunity/automation-examples/blob/… (or github.com/iuscommunity/automation-examples for other solutions)
    – jbmusso
    Nov 26, 2018 at 16:32
90

I found this nice and easy-to-follow guide on how to download the GIT source and compile it yourself (and install it). If the accepted answer does not give you the version you want, try the following instructions:

http://tecadmin.net/install-git-2-0-on-centos-rhel-fedora/

(And pasted/reformatted from above source in case it is removed later)

Step 1: Install Required Packages

Firstly we need to make sure that we have installed required packages on your system. Use following command to install required packages before compiling Git source.

# yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
# yum install  gcc perl-ExtUtils-MakeMaker

Step 2: Uninstall old Git RPM

Now remove any prior installation of Git through RPM file or Yum package manager. If your older version is also compiled through source, then skip this step.

# yum remove git

Step 3: Download and Compile Git Source

Download git source code from kernel git or simply use following command to download Git 2.5.3.

# cd /usr/src
# wget https://www.kernel.org/pub/software/scm/git/git-2.5.3.tar.gz
# tar xzf git-2.5.3.tar.gz

After downloading and extracting Git source code, Use following command to compile source code.

# cd git-2.5.3
# make prefix=/usr/local/git all
# make prefix=/usr/local/git install
# echo 'pathmunge /usr/local/git/bin/' > /etc/profile.d/git.sh 
# chmod +x /etc/profile.d/git.sh
# source /etc/bashrc

Step 4. Check Git Version

On completion of above steps, you have successfully install Git in your system. Use the following command to check the git version

# git --version

git version 2.5.3

I also wanted to add that the "Getting Started" guide at the GIT website also includes instructions on how to download and compile it yourself:

http://git-scm.com/book/en/v2/Getting-Started-Installing-Git

11
  • 1
    Re Step 3. setting the path, I found this (serverfault.com/a/303824) works better: # echo 'pathmunge /usr/local/git/bin/' > /etc/profile.d/git.sh # chmod +x /etc/profile.d/git.sh Jun 29, 2015 at 21:13
  • 3
    I tried on Centos 6.5 and tried latest (today) GIT version 2.5.3, and works like a charm. wget https://www.kernel.org/pub/software/scm/git/git-2.5.3.tar.gz
    – Vielinko
    Sep 18, 2015 at 22:13
  • 1
    Working with 2.7.4 and CentOS 6.5 - Thanks
    – Moe
    Mar 23, 2016 at 22:19
  • 1
    This allowed me to install 2.10.1 to keep parity with my git local client. Awesome set of instructions. Nov 1, 2016 at 18:42
  • 2
    If you still find that git is not installed then it might be due to pathmunge. You can use following commands to add git in your environment. echo "export PATH=/usr/local/git/bin:$PATH" >> /etc/bashrc and then source /etc/bashrc
    – mshakeel
    Mar 8, 2018 at 10:37
10

My personal preference is to build rpm packages for CentOS when installing non-standard software and replacing distributed components. For this I recommend that you use Mock to create a clean build environment.

The procedure is:

  1. Obtain the source RPMS or a suitable SPEC file and pristine source tarball. In this case one may find source RPM packages for git2X for CentOS-6 at: http://dl.iuscommunity.org/pub/ius/archive/CentOS/6/SRPMS/. Packages for other CentOS releases are also available.

  2. Install the necessary support software:

    yum install epel-release  # you need this for mock
    yum install rpm-build
    yum install redhat-rpm-config
    yum install rpmdevtools
    yum install mock
    
  3. Add a rpm build user account (do not build as root or as a real user - security issues will come back to bite you).

    sudo adduser builder --home-dir /home/builder \
    --create-home --user-group --groups mock \
    --shell /bin/bash --comment "rpm package builder"
    
  4. Next we need a build environment.

    su -l builder
    rpmdev-setuptree
    

    This produces the following directory structure:

    ~
    └── rpmbuild
        ├── BUILD
        ├── RPMS
        ├── SOURCES
        ├── SPECS
        └── SRPMS
    
  5. We are using a prepared SRPMS so the SOURCES tarballs can be ignored for this case and we can go direct to SRPMS.

    wget http://dl.iuscommunity.org/pub/ius/archive/CentOS/6/SRPMS/git2u-2.5.3-1.ius.centos6.src.rpm \
    -O ~/rpmbuild/SRPMS/git2u-2.5.3-1.ius.centos6.src.rpm
    
  6. Configure mock (as root)

    cd /etc/mock
    rm default.cfg
    ln -s epel-6-x86_64.cfg default.cfg
    vim default.cfg
    

    Disable the beta repos. Enable the base and update repos.

  7. Initialize the build tree (/var/lib/mock is default)

    mock --init
    
  8. If we were building from SOURCES then this is where we would employ the SPEC file and use mock --buildsrpm . . .. But in this case we go directly to the binary build step:

    mock --no-clean --rebuild ~/rpmbuild/SRPMS/git2u-2.5.3-1.ius.centos6.src.rpm
    

    This will resolve the build dependencies and download them (about 95 or so packages) into the clean build root. It will then extract the sources and build the binary from the provided SRPM and leave it in /var/lib/mock/epel-6-x86_64/result; or in whatever custom build root location and architecture you provided. It will take a long time. There is a lot to this package; particularly documentation.

  9. If all goes well then you should end up with a suit of RPM packages suitable for installation in place of the distro version. This is what I ended up with:

    ll /var/lib/mock/epel-6-x86_64/result
    total 34996
    -rw-rw-r--. 1 byrnejb mock   448455 Oct 30 10:09 build.log
    -rw-rw-r--. 1 byrnejb mock    52464 Oct 30 10:09 emacs-git2u-2.5.3-1.ius.el6.noarch.rpm
    -rw-rw-r--. 1 byrnejb mock    47228 Oct 30 10:09 emacs-git2u-el-2.5.3-1.ius.el6.noarch.rpm
    -rw-rw-r--. 1 byrnejb mock  8474478 Oct 30 09:57 git2u-2.5.3-1.ius.el6.src.rpm
    -rw-rw-r--. 1 byrnejb mock  8877584 Oct 30 10:09 git2u-2.5.3-1.ius.el6.x86_64.rpm
    -rw-rw-r--. 1 byrnejb mock    27284 Oct 30 10:09 git2u-all-2.5.3-1.ius.el6.noarch.rpm
    -rw-rw-r--. 1 byrnejb mock    27800 Oct 30 10:09 git2u-bzr-2.5.3-1.ius.el6.noarch.rpm
    -rw-rw-r--. 1 byrnejb mock   112564 Oct 30 10:09 git2u-cvs-2.5.3-1.ius.el6.noarch.rpm
    -rw-rw-r--. 1 byrnejb mock   436176 Oct 30 10:09 git2u-daemon-2.5.3-1.ius.el6.x86_64.rpm
    -rw-rw-r--. 1 byrnejb mock 15858600 Oct 30 10:09 git2u-debuginfo-2.5.3-1.ius.el6.x86_64.rpm
    -rw-rw-r--. 1 byrnejb mock    60556 Oct 30 10:09 git2u-email-2.5.3-1.ius.el6.noarch.rpm
    -rw-rw-r--. 1 byrnejb mock   274888 Oct 30 10:09 git2u-gui-2.5.3-1.ius.el6.noarch.rpm
    -rw-rw-r--. 1 byrnejb mock    79176 Oct 30 10:09 git2u-p4-2.5.3-1.ius.el6.noarch.rpm
    -rw-rw-r--. 1 byrnejb mock   483132 Oct 30 10:09 git2u-svn-2.5.3-1.ius.el6.x86_64.rpm
    -rw-rw-r--. 1 byrnejb mock   173732 Oct 30 10:09 gitk2u-2.5.3-1.ius.el6.noarch.rpm
    -rw-rw-r--. 1 byrnejb mock   115692 Oct 30 10:09 gitweb2u-2.5.3-1.ius.el6.noarch.rpm
    -rw-rw-r--. 1 byrnejb mock    57196 Oct 30 10:09 perl-Git2u-2.5.3-1.ius.el6.noarch.rpm
    -rw-rw-r--. 1 byrnejb mock    89900 Oct 30 10:09 perl-Git2u-SVN-2.5.3-1.ius.el6.noarch.rpm
    -rw-rw-r--. 1 byrnejb mock   101026 Oct 30 10:09 root.log
    -rw-rw-r--. 1 byrnejb mock      980 Oct 30 10:09 state.log
    
  10. Install using yum or rpm.

    You will require git2u-2.5.3-1.ius.el6.x86_64.rpm at a minimum and such additional support packages as it requires (perl-Git2u-2.5.3-1.ius.el6.noarch.rpm) or you desire.

    This build has a cyclic dependency: git2u-2.5.3-1.ius.el6.x86_64.rpm depends upon perl-Git2u-2.5.3-1.ius.el6.noarch.rpm and perl-Git2u-2.5.3-1.ius.el6.noarch.rpm depends upon git2u-2.5.3-1.ius.el6.x86_64.rpm. A straight install with rpm will thus fail.

    There are two ways of dealing with it:

    • Install both at the same time via yum:

      yum localinstall \
        git2u-2.5.3-1.ius.el6.x86_64.rpm \
        perl-Git2u-2.5.3-1.ius.el6.noarch.rpm`
      
    • Setup a local yum repo.

      I am including my LocalFile.repo file below as it contains instructions on how to do this and provides the necessary repo file at the same time.

cat /etc/yum.repos.d/LocalFile.repo
# LocalFile.repo
#
#  This repo is used with a local filesystem repo.
#
# To use this repo place the rpm package in /root/RPMS/yum.repo/Packages.
# Then run: createrepo --database --update /root/RPMS/yum.repo.
#
# To use:
#  yum --enablerepo=localfile [command]
#  
# or to use only ONLY this repo, do this:
#
#  yum --disablerepo=\* --enablerepo=localfile [command]

[localfile]
baseurl=file:///root/RPMS/yum.repo
name=CentOS-$releasever - Local Filesystem repo

# Before persistently enabling this repo see the priority note below.
enabled=0
gpgcheck=0

# When this repo is enabled all packages in repos with priority>5
# will not be updated even when they have a more recent version.
# Be careful with this.
priority=5

You also may be required to manually pre-install additional dependency packages such as perl-TermReadKey available from the usual repositories.

1
  • If you aren't going to be editing the spec file, why not just use the IUS binary packages directly? Feb 14, 2017 at 15:51
5

To build and install modern Git on CentOS 6:

yum install -y curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker
export GIT_VERSION=2.6.4
mkdir /root/git
cd /root/git
wget "https://www.kernel.org/pub/software/scm/git/git-${GIT_VERSION}.tar.gz"
tar xvzf "git-${GIT_VERSION}.tar.gz"
cd git-${GIT_VERSION}
make prefix=/usr/local all
make prefix=/usr/local install
yum remove -y git
git --version # should be GIT_VERSION
5

Build latest version of git on Centos 6/7

Preparing system to building rpms

  1. Install epel:

    For EL6, use:

    sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm  
    

    For EL7, use:

    sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
    
  2. Install fedpkg:

    sudo yum install fedpkg
    
  3. Add yourself into group mock (you might need to re-login to server after this change):

    sudo usermod -a -G mock $USER
    

Download git

  1. Download git sources:

    fedpkg clone -a git && cd git
    fedpkg sources
    
  2. Verify sources:

    sha512sum -c sources
    

Build rpm

  1. Create srmp. Use el6 for RHEL6, el7 for RHEL7.

    fedpkg --dist el7 srpm
    
  2. Build package in mock:

    mock -r epel-7-x86_64 git-2.16.0-1.el7.src.rpm
    
  3. Install latest version of git rpm from /var/lib/mock/epel-7-x86_64/result/. Note, you might need to uninstall existing version of the git from your system first.

This instruction is based on the mailing list post by Todd Zullinger.

1
  • 1
    Great answer. Keep it under package management. Much better than using unofficial repos or installing from source. I've always downloaded the src package from the Fedora package site through the browser, but this is a much cleaner solution. Thanks!
    – orodbhen
    Apr 4, 2019 at 17:21
5

as git says:

RHEL and derivatives typically ship older versions of git. You can download a tarball and build from source, or use a 3rd-party repository such as the IUS Community Project to obtain a more recent version of git.

there is good tutorial here. in my case (Centos7 server) after install had to logout and login again.

4

This guide worked:

# hostnamectl
  Operating System: CentOS Linux 7 (Core)
# git --version
git version 1.8.3.1
# sudo yum remove git*
# sudo yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm
# sudo yum install git
# git --version
git version 2.24.1
2
  • 1
    For anyone that doesn't already have the Endpoint repo trusted on their machine, I ran: curl -LO 'packages.endpoint.com/endpoint-rpmsign-7.pub', rpm --import endpoint-rpmsign-7.pub, rpm -qi gpg-pubkey-703df089 | gpg --with-fingerprint Feb 4, 2021 at 14:58
  • 1
    For anyone else using the End Point package repository, note that it has moved and you can now get the current repo RPM URLs at: packages.endpointdev.com It also has Git 2.30.1 at the moment.
    – Jon Jensen
    Dec 5, 2021 at 1:22
3

Here's my method to install git on centos 6.

sudo yum groupinstall "Development Tools"
sudo yum install zlib-devel perl-ExtUtils-MakeMaker asciidoc xmlto openssl-devel curl-devel
sudo yum install wget
cd ~
wget -O git.zip https://github.com/git/git/archive/v2.7.2.zip
unzip git.zip
cd git-2.7.2
make configure
./configure --prefix=/usr/local
make all doc
sudo make install install-doc install-html
1
  • In my experience (centos 6.7), you should also also yum install libcurl-devel.
    – jgrump2012
    Aug 17, 2016 at 23:53
3

Adding a roundabout answer here. I was struggling to install git on an RHEL 6.0 Amazon instance, and what ended up saving me was ... conda, as in Anaconda Python.

I installed conda on the command line from the archives (code modeled after this):

wget http://repo.continuum.io/miniconda/Miniconda2-4.2.12-Linux-x86_64.sh -O ~/miniconda.sh
bash ~/miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"

and then ran

conda install git

and a relatively recent version git was installed. Today is 12/26/2016 and the version is 2.9.3.

0
1

This may be irrelevant. It is for people don't want build the latest git on the host meanwhile they still can get the latest git.

I think most people don't like building the latest git on CentOS because the dependencies will contaminate the host and you have to run lots of commands. Therefore, I have an idea which is building git inside the Docker container and then install the executable via the docker volume mount. After that, you can delete the image and container.

Yes, the downside is you have to install docker. But the least dependencies are introduced to the host and you don't have to install other yum repo.

Here is my repository. https://github.com/wood1986/docker-library/tree/master/git

0

If git already installed first remove old git

sudo yum remove git*

And install latest version of git

yum install -y git-core

Check Version git --version

bingo!!

1
  • 1
    With yum install -y git2u, I got the error message No package git2u available.. However, the command yum install -y git-core has successfully installed git version 2.24.3. Also yum install -y git224 leads to the desired result. Note, that removing existing git installations is needed to avoid possible conflicts. Note also that yum install -y git or yum install -y git-all might install an older version from existing repos (tested in the current centos:7 docker image; there, git version 1.8.3.1 is installed, currently).
    – Olli
    Oct 23, 2020 at 15:11
0

Here is the Steps to upgrade git on CentOS 7 which I have followed

$ sudo yum list git*

Installed Packages
git.x86_64                                                                                            1.8.3.1-20.el7                                                                                     @base  
Available Packages  
git.x86_64          1.8.3.1-25.el7_9     updates 
git-svn.x86_64      1.8.3.1-25.el7_9     updates  
git236.x86_64       2.36.6-1.el7.ius     ius    
git236-all.noarch   2.36.6-1.el7.ius     ius    
git236-core.x86_64  2.36.6-1.el7.ius     ius    

Choose from above git pkg list e.g git236

$ sudo yum shell
Loaded plugins: fastestmirror, langpacks
> erase git
> install git236
Loading mirror speeds from cached hostfile
 * base: linux.mirrors.es.net
 * epel: mirrors.sonic.net
 * extras: centos-distro.cavecreek.net
 * updates: mirror.team-cymru.com
> run
--> Running transaction check
---> Package git.x86_64 0:1.8.3.1-20.el7 will be erased
--> Processing Dependency: git = 1.8.3.1-20.el7 for package: perl-Git-1.8.3.1-20.el7.noarch
---> Package git236.x86_64 0:2.36.6-1.el7.ius will be installed
--> Processing Dependency: perl-Git = 2.36.6-1.el7.ius for package: git236-2.36.6-1.el7.ius.x86_64
--> Processing Dependency: git-core-doc = 2.36.6-1.el7.ius for package: git236-2.36.6-1.el7.ius.x86_64
--> Processing Dependency: git-core = 2.36.6-1.el7.ius for package: git236-2.36.6-1.el7.ius.x86_64
--> Processing Dependency: perl(Git::I18N) for package: git236-2.36.6-1.el7.ius.x86_64
--> Processing Dependency: perl(Git) for package: git236-2.36.6-1.el7.ius.x86_64
--> Running transaction check
---> Package git236-core.x86_64 0:2.36.6-1.el7.ius will be installed
--> Processing Dependency: libpcre2-8.so.0()(64bit) for package: git236-core-2.36.6-1.el7.ius.x86_64
---> Package git236-core-doc.noarch 0:2.36.6-1.el7.ius will be installed
---> Package git236-perl-Git.noarch 0:2.36.6-1.el7.ius will be installed
---> Package perl-Git.noarch 0:1.8.3.1-20.el7 will be erased
--> Running transaction check
---> Package pcre2.x86_64 0:10.23-2.el7 will be installed
--> Finished Dependency Resolution

================================================================================================================================================================================================================
 Package                                               Arch                                         Version                                                   Repository                                   Size
================================================================================================================================================================================================================
Installing:
 git236                                                x86_64                                       2.36.6-1.el7.ius                                          ius                                          71 k
Removing:
 git                                                   x86_64                                       1.8.3.1-20.el7                                            @base                                        22 M
Installing for dependencies:
 git236-core                                           x86_64                                       2.36.6-1.el7.ius                                          ius                                         6.9 M
 git236-core-doc                                       noarch                                       2.36.6-1.el7.ius                                          ius                                         2.8 M
 git236-perl-Git                                       noarch                                       2.36.6-1.el7.ius                                          ius                                          46 k
 pcre2                                                 x86_64                                       10.23-2.el7                                               base                                        201 k
Removing for dependencies:
 perl-Git                                              noarch                                       1.8.3.1-20.el7                                            @base                                        57 k

Transaction Summary
================================================================================================================================================================================================================
Install  1 Package (+4 Dependent packages)
Remove   1 Package (+1 Dependent package)

Total download size: 9.9 M
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/7/ius/packages/git236-2.36.6-1.el7.ius.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 4b274df2: NOKEY                                      ]  0.0 B/s |    0 B  --:--:-- ETA 
Public key for git236-2.36.6-1.el7.ius.x86_64.rpm is not installed
(1/5): git236-2.36.6-1.el7.ius.x86_64.rpm                                                                                                                                                |  71 kB  00:00:00     
(2/5): git236-core-2.36.6-1.el7.ius.x86_64.rpm                                                                                                                                           | 6.9 MB  00:00:00     
(3/5): git236-core-doc-2.36.6-1.el7.ius.noarch.rpm                                                                                                                                       | 2.8 MB  00:00:00     
(4/5): git236-perl-Git-2.36.6-1.el7.ius.noarch.rpm                                                                                                                                       |  46 kB  00:00:00     
(5/5): pcre2-10.23-2.el7.x86_64.rpm                                                                                                                                                      | 201 kB  00:00:00     
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                           9.2 MB/s | 9.9 MB  00:00:01     
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-IUS-7
Importing GPG key 0x4B274DF2:
 Userid     : "IUS (7) <[email protected]>"
 Fingerprint: c958 7a09 a11f d706 4f0c a0f4 e558 0725 4b27 4df2
 Package    : ius-release-2-1.el7.ius.noarch (installed)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-IUS-7
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : pcre2-10.23-2.el7.x86_64                                                                                                                                                                     1/7 
  Installing : git236-core-2.36.6-1.el7.ius.x86_64                                                                                                                                                          2/7 
  Installing : git236-core-doc-2.36.6-1.el7.ius.noarch                                                                                                                                                      3/7 
  Installing : git236-perl-Git-2.36.6-1.el7.ius.noarch                                                                                                                                                      4/7 
  Installing : git236-2.36.6-1.el7.ius.x86_64                                                                                                                                                               5/7 
  Erasing    : perl-Git-1.8.3.1-20.el7.noarch                                                                                                                                                               6/7 
  Erasing    : git-1.8.3.1-20.el7.x86_64                                                                                                                                                                    7/7 
  Verifying  : pcre2-10.23-2.el7.x86_64                                                                                                                                                                     1/7 
  Verifying  : git236-core-doc-2.36.6-1.el7.ius.noarch                                                                                                                                                      2/7 
  Verifying  : git236-core-2.36.6-1.el7.ius.x86_64                                                                                                                                                          3/7 
  Verifying  : git236-2.36.6-1.el7.ius.x86_64                                                                                                                                                               4/7 
  Verifying  : git236-perl-Git-2.36.6-1.el7.ius.noarch                                                                                                                                                      5/7 
  Verifying  : git-1.8.3.1-20.el7.x86_64                                                                                                                                                                    6/7 
  Verifying  : perl-Git-1.8.3.1-20.el7.noarch                                                                                                                                                               7/7 

Removed:
  git.x86_64 0:1.8.3.1-20.el7                                                                                                                                                                                   

Dependency Removed:
  perl-Git.noarch 0:1.8.3.1-20.el7                                                                                                                                                                              

Installed:
  git236.x86_64 0:2.36.6-1.el7.ius                                                                                                                                                                              

Dependency Installed:
  git236-core.x86_64 0:2.36.6-1.el7.ius               git236-core-doc.noarch 0:2.36.6-1.el7.ius               git236-perl-Git.noarch 0:2.36.6-1.el7.ius               pcre2.x86_64 0:10.23-2.el7              

Finished Transaction
> quit
Leaving Shell

Check/validate git version after upgrade.

$ git --version
git version 2.36.6

1
  • 1
    It would be more helpful to others if you could separate the comands from the outputs Jan 25 at 6:47
-3

It can be very confusing, and dangerous, to replace the upstream base repositories with add-on repositories without considerable testing and thought. RPMforge, in particularly, is effectively moribund and is not getting updates.

I personally publish tools for building git 2.4, wrapped as an alternatively named "git24" package, at https://github.com/nkadel/git24-srpm/. Feel free to access and fork those if you want packages distinguished from the standard system packages, much as "samba" and "samba4" packages are differentiated.

1
  • 1
    It is okay to link to your own resources/websites at times, but please make sure your post still provides a sufficiently complete answer even if your link did not work (incidentally, it already doesn't work) Aug 12, 2015 at 18:37

Not the answer you're looking for? Browse other questions tagged or ask your own question.