Have a Question?

If you have any question you can ask below or enter what you are looking for!

How to install git on cPanel server


Git is a free and open source distributed version control system which can handle everything from small to very large projects with speed and efficiency.

This article describes installing git version control system on your server with CentOS 6 operating system and cPanel hosting control panel.


Commands described here require root user privilege on the CentOS 6 server.

Installing git

Git package is available on base YUM repository of CentOS 6. So it can be installed using yum package manager tool. git package requires a few Perl module packages. But installing Perl packages using yum is disabled by following cPanel-create exclude setting in /etc/yum.conf:

exclude=bind-chroot courier* dovecot* exim* filesystem httpd* mod_ssl* mydns* mysql* nsd* perl* php* proftpd* pure-ftpd* ruby* spamassassin* squirrelmail*

As you can see cPanel has created this exclude in the main configuration section of YUM. To install git, you need to temporarily disable this exclude in main section so that Perl packages required by git can be installed. The yum package manager command for disabling this exclude temporarily and installing git is given below:

yum --disableexcludes=main install git

Alternative method to use git in a cPanel server is to use the git tool bundled with cPanel. Since cPanel version 11.36, git is included in cPanel software. Git binary installed by cPanel is located at /usr/local/cpanel/3rdparty/bin/git. You can create a symbolic link to this binary as given below:

ln -s /usr/local/cpanel/3rdparty/bin/git /usr/bin/git

Now git can be accessed with git command:

root@server [~]# git --version
git version 2.2.0

Leave a Reply

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

You can use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>