Shared Hosting supports git push, but why we will remain happy with a minimal feature! You can add a Web Interface to Git on Shared Hosting. We Can Use Git Repo In Shared Hosting Account, right? We know What is Jailed Shell, right? After knowing so much, if we do not use the features then where the deployment of learning will go! Actually there are lot of options for adding a Web Interface to Git Repository which includes high end Github Enterprise software (you pay the fees for installing on your server), Gitlab ( poor man’s Gihhub Enterprise – Free Software ) to very simple web interface.
Options for Adding a Web Interface to Git Repository on Shared Hosting
Unfortunately, although Ruby is supported by cPanels, it is actually gets complicated if we use Ruby base software to add a web interface to our Git. We actually have to control the stuffs with
.htaccess file! PHP is always running, what is the problem of using PHP? Nothing. Except that, you can not use more modern PHP Git Interface, you have to limit your wishes within few features. Actually you can do a bit customization with Twitter Bootstrap to make it looking better.
Add a Web Interface to Git Repository on Shared Hosting
You need to understand few important points. First is that, this method is great if you are using a SSL certificate for kind of Organization’s project, in that case, you’ll create a subdirectory on the domain’s FTP root from cPanel’s File Manager. If the directory’s name is
repository and domain’s name is
freehealthfoundation.org then the Public URL is becoming :
Keep the name in lower case and you must create proper
.htaccess files for controlling public access to FTP or Git contents circumventing your wish.
We will use :
First, login via SSH :
~ ssh -p 2222 firstname.lastname@example.org
# if you are login for the first time
# or deleted the entry from known hosts file
The authenticity of host '[140.258.189.20]:2222 ([126.96.36.199]:2222)' can't be established.
RSA key fingerprint is bb:6a:51:b4:63:e8:3b:a1:c9:c8:29:3f:b9:1b:4e:49.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[140.258.189.20]:2222' (RSA) to the list of known hosts.
# we have lodged in, do a pwd
email@example.com [~]# pwd
# this is maximum the upper level you can access
firstname.lastname@example.org [~]# cd ~
Now go to that directory on command line; the $PATH can be :
You should check by placing a plain HTML file and loading it on browser. We can not install any Git Web Interface with existing repositories – may be there are softwares, but the rule is to start with bare repo :
So, init the bare repo, taking that you are in the repository on command line :
git init --bare /home3/tcwmedia/repository/mybareproject.git
wget the software :
Untar it :
tar -xzvf gitphp*
# move all to one level up
mv * ..
pwd && ls
# delete the tar file
rm -r gitphp*
Install normally after moving the files to root as written there.
Follow the Author of this article :