I tried several suggestions from this answer but none of them worked.[root@308321 sugar-dev]# yum install gitLoaded plugins: fastestmirrorLoading mirror speeds from cached hostfile * base: mirror.ubiquityservers.com * epel: www.gtlib.gatech.edu * extras: mirrors.usinternet.com * updates: mirrors.serveraxis.netSetting up Install ProcessResolving Dependencies--> Running transaction check---> Package git.x86_64 0:1.8.2.1-1.el5 will be installed--> Processing Dependency: perl-Git = 1.8.2.1-1.el5 for package: git-1.8.2.1-1.el5.x86_64--> Processing Dependency: perl(Term::ReadKey) for package: git-1.8.2.1-1.el5.x86_64--> Processing Dependency: perl(Git) for package: git-1.8.2.1-1.el5.x86_64--> Processing Dependency: perl(Error) for package: git-1.8.2.1-1.el5.x86_64--> Processing Dependency: libssl.so.6()(64bit) for package: git-1.8.2.1-1.el5.x86_64--> Processing Dependency: libexpat.so.0()(64bit) for package: git-1.8.2.1-1.el5.x86_64--> Processing Dependency: libcurl.so.3()(64bit) for package: git-1.8.2.1-1.el5.x86_64--> Processing Dependency: libcrypto.so.6()(64bit) for package: git-1.8.2.1-1.el5.x86_64--> Running transaction check---> Package compat-expat1.x86_64 0:1.95.8-8.el6 will be installed---> Package git.x86_64 0:1.8.2.1-1.el5 will be installed--> Processing Dependency: libcurl.so.3()(64bit) for package: git-1.8.2.1-1.el5.x86_64---> Package openssl098e.x86_64 0:0.9.8e-17.el6.centos.2 will be installed---> Package perl-Error.noarch 1:0.17015-4.el6 will be installed---> Package perl-Git.x86_64 0:1.8.2.1-1.el5 will be installed--> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: perl-Git-1.8.2.1-1.el5.x86_64---> Package perl-TermReadKey.x86_64 0:2.30-13.el6 will be installed--> Finished Dependency ResolutionError: Package: perl-Git-1.8.2.1-1.el5.x86_64 (epel)           Requires: perl(:MODULE_COMPAT_5.8.8)Error: Package: git-1.8.2.1-1.el5.x86_64 (epel)           Requires: libcurl.so.3()(64bit) You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest[root@308321 sugar-dev]# yum -y install git --disablerepo=updatesLoaded plugins: fastestmirrorLoading mirror speeds from cached hostfile * base: mirror.ubiquityservers.com * epel: www.gtlib.gatech.edu * extras: mirrors.usinternet.comSetting up Install ProcessResolving Dependencies--> Running transaction check---> Package git.x86_64 0:1.8.2.1-1.el5 will be installed--> Processing Dependency: perl-Git = 1.8.2.1-1.el5 for package: git-1.8.2.1-1.el5.x86_64--> Processing Dependency: perl(Term::ReadKey) for package: git-1.8.2.1-1.el5.x86_64--> Processing Dependency: perl(Git) for package: git-1.8.2.1-1.el5.x86_64--> Processing Dependency: perl(Error) for package: git-1.8.2.1-1.el5.x86_64--> Processing Dependency: libssl.so.6()(64bit) for package: git-1.8.2.1-1.el5.x86_64--> Processing Dependency: libexpat.so.0()(64bit) for package: git-1.8.2.1-1.el5.x86_64--> Processing Dependency: libcurl.so.3()(64bit) for package: git-1.8.2.1-1.el5.x86_64--> Processing Dependency: libcrypto.so.6()(64bit) for package: git-1.8.2.1-1.el5.x86_64--> Running transaction check---> Package compat-expat1.x86_64 0:1.95.8-8.el6 will be installed---> Package git.x86_64 0:1.8.2.1-1.el5 will be installed--> Processing Dependency: libcurl.so.3()(64bit) for package: git-1.8.2.1-1.el5.x86_64---> Package openssl098e.x86_64 0:0.9.8e-17.el6.centos.2 will be installed---> Package perl-Error.noarch 1:0.17015-4.el6 will be installed---> Package perl-Git.x86_64 0:1.8.2.1-1.el5 will be installed--> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: perl-Git-1.8.2.1-1.el5.x86_64---> Package perl-TermReadKey.x86_64 0:2.30-13.el6 will be installed--> Finished Dependency ResolutionError: Package: perl-Git-1.8.2.1-1.el5.x86_64 (epel)           Requires: perl(:MODULE_COMPAT_5.8.8)Error: Package: git-1.8.2.1-1.el5.x86_64 (epel)           Requires: libcurl.so.3()(64bit) You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest[root@308321 sugar-dev]# yum install git --disableexcludes=main --skip-brokenLoaded plugins: fastestmirrorLoading mirror speeds from cached hostfile * base: mirror.ubiquityservers.com * epel: www.gtlib.gatech.edu * extras: mirrors.usinternet.com * updates: mirrors.serveraxis.netSetting up Install ProcessResolving Dependencies--> Running transaction check---> Package git.x86_64 0:1.8.2.1-1.el5 will be installed--> Processing Dependency: perl-Git = 1.8.2.1-1.el5 for package: git-1.8.2.1-1.el5.x86_64--> Processing Dependency: perl(Term::ReadKey) for package: git-1.8.2.1-1.el5.x86_64--> Processing Dependency: perl(Git) for package: git-1.8.2.1-1.el5.x86_64--> Processing Dependency: perl(Error) for package: git-1.8.2.1-1.el5.x86_64--> Processing Dependency: libssl.so.6()(64bit) for package: git-1.8.2.1-1.el5.x86_64--> Processing Dependency: libexpat.so.0()(64bit) for package: git-1.8.2.1-1.el5.x86_64--> Processing Dependency: libcurl.so.3()(64bit) for package: git-1.8.2.1-1.el5.x86_64--> Processing Dependency: libcrypto.so.6()(64bit) for package: git-1.8.2.1-1.el5.x86_64--> Running transaction check---> Package compat-expat1.x86_64 0:1.95.8-8.el6 will be installed---> Package git.x86_64 0:1.8.2.1-1.el5 will be installed--> Processing Dependency: libcurl.so.3()(64bit) for package: git-1.8.2.1-1.el5.x86_64---> Package openssl098e.x86_64 0:0.9.8e-17.el6.centos.2 will be installed---> Package perl-Error.noarch 1:0.17015-4.el6 will be installed---> Package perl-Git.x86_64 0:1.8.2.1-1.el5 will be installed--> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: perl-Git-1.8.2.1-1.el5.x86_64---> Package perl-TermReadKey.x86_64 0:2.30-13.el6 will be installed--> Finished Dependency ResolutionPackages skipped because of dependency problems:    compat-expat1-1.95.8-8.el6.x86_64 from base    git-1.8.2.1-1.el5.x86_64 from epel    openssl098e-0.9.8e-17.el6.centos.2.x86_64 from base    1:perl-Error-0.17015-4.el6.noarch from base    perl-Git-1.8.2.1-1.el5.x86_64 from epel    perl-TermReadKey-2.30-13.el6.x86_64 from base[root@308321 sugar-dev]# git-bash: git: command not found[root@308321 sugar-dev]#[root@308321 sugar-dev]# uname -aLinux 308321.oliveyou.net 2.6.32-220.2.1.el6.x86_64 #1 SMP Fri Dec 23 02:21:33 CST 2011 x86_64 x86_64 x86_64 GNU/Linux
How to install git for CentOS?
centos;yum
Your problem is not too few versions of git available, but too many; git is in the base/updates repo set, but a newer version is also in epel, and they are treading on each other's feet.  You also appear to have an old version of the epel repo wired in (it's picking up .el5 packages), and that definitely won't be helping.Tryyum install git --disablerepo=epelwhich should get you get 1.7.1.  If that works, you might also want to fix your epel repo (it's in /etc/yum.repos.d/epel.repo) and to look into repository prioritisation, which helps prevents newer versions of tools (usually from add-on repos) from treading on older versions (from core repos) unless you specifically ask for them to do so.