How to set up git repo on my subdomain?

2

I have a centOS VPS and I have install git.

However, I want to set up a git repo on a subdomain on one of the domains hosted on my vps in order so I can push there for testing.

How do I do this?

RSM

Posted 2013-06-29T14:42:20.557

Reputation: 413

Answers

0

Two options are to use the simple ssh setup from the git book here or gitolite. I prefer gitolite though since you would then have fine grained control over permissions. There are other protocols that you could use as well, but ssh has been in my experience the easiest to set up.

Once you have your subdomain pointing at your VPS ip you can clone and push to it directly via the git ssh protocol. For example:

git clone git@git.website.com:my_repo

This example assumes the following:

  • Your ssh username is git
  • Your sub domain is git.website.com
  • Your repositories name is my_repo

Daniel Paul Searles

Posted 2013-06-29T14:42:20.557

Reputation: 101