If you’re trying to install Git on CentOS with cPanel, you’ll probably be running into the problems where you can’t get hold the RPM because cPanel excludes all Perl modules. But that is a whole different problem to if you are running CentOS 4.
CentOS 4 doesn’t actually have the RPMs for Git at all. But luckily, it’s actually really easy to install on a cPanel server because cPanel should come will all the dependencies you need.
So, all you need to do is head over to the Git website, download the latest source (I tried it with v184.108.40.206) and compile it – no problems, no worries.
wget http://git-core.googlecode.com/files/git-220.127.116.11.tar.gz tar xvzf git-18.104.22.168.tar.gz cd git-22.214.171.124 ./configure make make install