RudyGems

Matthew Rudy Jacobs
see me swim
Github
see some of my code
WorkingWithRails
see me working with rails

setting up a simple git server

On the internet you’ll see people talking about Gitosis, or just giving over all of their git requirements to github.

Github is great, but if you just want to do a small personal project, with an off-site repository, go set up your VPS as your main git server.

Here’s how you do it.

  1. create a “git” user

    sudo adduser git
  2. add your ssh keys to that user

    ssh-copy-id git@my.com
  3. create a “bare” repository on your server

    mkdir myRepo.git
    git --bare init
  4. add this as a remote source

    git remote add origin git@my.com:myRepo.git
    git push origin master

BOOM! that is literally all it takes!

Thanks to CommonThread for his tutorial on doing this.

Comments (View)
blog comments powered by Disqus