≡ Menu

Install git on a cPanel Shared Hosting Account

**NOTE** You will need to have compiler access on your shared hosting account in order for the instructions below to work. You can request your host enable this, or pass these instructions along to them and request they compile git for you.

From SSH:

wget http://git-core.googlecode.com/files/git-
tar zxvf git-
cd git-
./configure --prefix=/home/$USER
make install
echo 'PATH=$PATH:$HOME/bin' >> $HOME/.bashrc
source $HOME/.bashrc

If you get the error “bash: /usr/bin/wget: Permission denied” you can try downloading the git source with the command

curl -O http://git-core.googlecode.com/files/git-
{ 7 comments… add one }
  • Milan Cole July 11, 2012, 4:03 pm

    Thanks, worked like a charm. Some other install guides didn’t think to set the path intelligently.

    • Nick July 24, 2012, 3:42 pm

      Thanks for this! It saved me a lot of headache.

  • michaelcolenso December 5, 2012, 12:35 am

    worked perfectly. thanks!

    • Francois September 25, 2013, 2:38 pm

      Wow!!! Guess I don’t know enough about linux to figure this shit out, great work it works perfect so far. Now it is just for setting it up with github…

  • John Smith September 7, 2013, 4:46 am

    Thanks for sharing!

    I had an error when I run ./configure –prefix=/home/$USER
    Like this: ./configure.lineno: line 428: expr: command not found
    So, how can I continuos?

Leave a Comment