Using git on a shared hosting
As most of the shared hosting companies out there mine doesn’t grants you root access, that’s ok, but it does gives you SSH access using a weird control panel where you need to enter you current IP and then they let you in. Said that I wanted to use git on that server, to then simply do a git pull origin staging
and get all the fancy thing I’m working on to the stating server.
To do so we need:
- SSH access
- Git installed (without root access compiling one won’t be easy/feasible)
- A published repo. I’ve done it with Github and Bitbucket’s
Too easy to be true
First attempt:
As you can see this is simple chiming you don’t have any certificates or you don’t have access to the path specified, at this point you may want to get in touch with your hosting support guy… or you can disable the check for SSL certificates, after all you are accessing a ‘public’ repo for read-only proposes.
The DIY way
Need to grab the https address of the repo to clone and then on the server do the following:
That worked for me and I hope it saves you some time.
blog comments powered by Disqus