Private GIT server on centos 6

So i need to have an private git server. The plan is to fill the git server with my backups so I can see changes done to my git server.

 

Set up the local GIT server

Users

adduser git
passwd git

Become the git user and go to home folder

su git
cd  ~

Create the repo

mkdir myrepo.git
cd myrepo.git/
git --bare init

So now the repo is done lets connect to it and start using it.
As another user i use root

make some ssh keys and add them to the git user

ssh-keygen -t rsa
ssh-copy-id git@localhost

Start using git

git clone git@localhost:myrepo.git
cd myrepo/
touch README
git add .
git commit -m "first"
git config --global user.name "Mattias Hemmingsson"
git config --global user.email matte@aaaelino.se
git push origin master

Happy GIT !