Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.