Instal git on cPanel/WHM
DO NOT INSTALL GIT ON WHM SERVER! Because it’s already installed
It’s just not in path and you can’t use it.
There are two ways of doing this:
1. WHM/root way that will make git available to all users on the system
2. cPanel way that will make git available only for the current account
Hot to enable it in WHM?
To make git usable to all users (with ssh access) just execute this single line of code as root:
ln -s /usr/local/cpanel/3rdparty/bin/git /usr/local/bin/git
How to enable it in cPanel?
If you are using a shared (or reseller) hosting powered by cPanel (and you don’t have WHM access) than you need to login using SSH and locate your .bashrc file. It should be in your home directory. Open that file for editing and add git to your path by adding following two lines of code at the end of your .bashrc file: