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.
-
create a “git” user
sudo adduser git -
add your ssh keys to that user
ssh-copy-id git@my.com -
create a “bare” repository on your server
mkdir myRepo.git git --bare init -
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.