Free Shared Hosting Git Repository For Your Teams!

If you don’t want to pay for codebasehq, github or any other service for private git repositories then do this on your shared hosting account:

// log into your server and install latest git:
mkdir ~/temp
cd ~/temp
curl -O
tar xvfz git-1.X...tar.gz
cd git-1.X..
./configure --prefix=$HOME
make SHELL="/bin/bash" install
// test if installed
git --version
// check which one
which git
// if above fails compile git on user space (google this)
// then continue
// add origin to remotes
mkdir -p ~/repos/yourproject.git
cd ~/repos/yourproject.git
git --bare init
// now from local enter the folder where your git tracked files are
git remote add origin ssh://
// put this on your .git/config so you can do git pull and push easily
[branch "master"]
        remote = origin
        merge = refs/heads/master
// to avoid typing passwords
// enjoy and please donate!

It has been verified with this hosting here of which I am an affiliate too because I do recommend it and work with it.

Adapted from here.

One thought on “Free Shared Hosting Git Repository For Your Teams!

  1. Hah! I think Git is already pre-installed on my host though. At least I can clone my github repository directly from there and deploy like that. That’s the only way I was using it so far.

Leave a Reply

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