How can I configure yum to use some repository which has git rpms?


Use the EPEL (Extra Packages for Enterprise Linux) repository. The easiest way to enable it is by installing the epel-release package. Here's how if you have RHEL 5 x86_64:

[root@localhost]# rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-5.noarch.rpm
[root@localhost]# yum install git
  • 2
    I would make sure to install a 64-bit version of git if you're really using a 64-bit system because git is a heavy user of mmap() and loves to have a large address space if the project's getting bigger (during repacking, etc). – knweiss Nov 4 '09 at 20:54
  • Following Cristian's directions, he will get 64-bit if he is on 64-bit architecture. – James May 16 '11 at 17:41
  • If I run $ rpm -Uvh http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm I get error: skipping http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm - transfer failed - Unknown or unexpected error warning: u 0x1db4cfe0 ctrl 0x1db501a0 nrefs != 0 (download.fedoraproject.org http) – highBandWidth Oct 12 '12 at 1:12
  • @highBandWidth: your mirror might have some issues. Try to download epel-release manually by following the instructions from the EPEL page. – Cristian Ciupitu Oct 12 '12 at 10:45
  • 1
    It seems now you need to do dl.fedoraproject.org. – highBandWidth Oct 12 '12 at 15:15

For a more up-to-date version of Git ( at the time of this writing versus in the EPEL repository), see Andrew Thompson's Webtatic repository:



i Suggest you can download the source from offical webpage and to do configure & make & make install instead of use yum. :D

  • Why? People like the tracking features of using an RPM, is there some other benefit of compiling yourself? – Ken Williams Jul 16 '14 at 14:28
  • Because (make, make install) is the same for every linux System, while the RPMs aren't and have to be changed for every distribution (rhel, ubuntut ....) – eactor Jul 26 '17 at 8:48

Elaborating @Cristian Ciupitu answer it would be possible to do it via yum.repos.d:

  1. Go to https://fedoraproject.org/keys and install the RPM-GPG-KEY-EPEL public key by downloading its contents into the RPM-GPG-KEY-EPEL file and running rpm --import RPM-GPG-KEY-EPEL.

  2. Create a file rhel-epel.repo (choose any name you want) in /etc/yum.repos.d/

  3. Add following content:

    name=Extra Packages for Enterprise Linux $releasever - $basearch
  4. run yum install git.


one way i feel it should work /etc/yum.repos.d/same.repo if you give git locate where your looking git packages

  • 2
    This doesn't actually lead to a solution. – Bill Weiss Nov 4 '09 at 16:20
  • 1
    Given its score, perhaps this answer should be deleted. – Cristian Ciupitu Dec 17 '13 at 13:52
  • 1
    Better to leave it here to show that it's not a good idea. – Ken Williams Jul 16 '14 at 14:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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