Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

5 Answers 5

up vote 34 down vote accepted

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 http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
[root@localhost]# yum install git
share|improve this answer
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

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

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

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

http://www.webtatic.com/blog/2009/09/git-on-centos-5/

share|improve this answer

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

share|improve this answer
    
Why? People like the tracking features of using an RPM, is there some other benefit of compiling yourself? –  Ken Williams Jul 16 at 14:28

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:

    [rhel-epel]
    name=Extra Packages for Enterprise Linux $releasever - $basearch
    baseurl=http://download3.fedora.redhat.com/pub/epel/$releasever/$basearch
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
    
  4. run yum install git.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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