Install git on CentOS

I wanted to put git on one of my CentOS 5.5 servers. Following the links to download the source led to a web page advising to install with yum. But when I tried,

# yum install git
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.usc.edu
* extras: mirrors.usc.edu
* updates: mirrors.usc.edu
Setting up Install Process
No package git available.
Nothing to do

frustrating! Here’s the solution, add the webtatic repository first:
# Add the repository
rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm

# Install the latest version of git
yum install --enablerepo=webtatic git-all

a lot of dependencies were installed and updated. I didn’t need the workaround mentioned, but in case someone else might:
To work around Missing Dependency: perl(Git) errors:
yum install --enablerepo=webtatic --disableexcludes=main git-all

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *