Installing git on a cPanel server Installing git on a cPanel server git git

Installing git on a cPanel server


I figured out the same problem, but I find out that from the WHM/Cpanel version 11.36+ Git is installed by default in the system and available for all the account.

You have just to create a Git's account (be sure to add remote ssh access) then in your .bashrc you add just this alias

alias git="/usr/local/cpanel/3rdparty/bin/git"

then if you type git in the user's shell, it should just work automagically ;)

Cheers


cPanel disables Perl updates to protect its own binaries, which are git dependencies.

Just run yum with the following lines.

sudo yum install git --disableexcludes=main --skip-broken


Remember if you are updating the bashrc file to reload this so you dont have to restart your SSH session by using:

source ~/.bashrc