git server setup

In previous post I wrote that memory card in my Raspberry PI died ( more here RaspberryPI machine rebuild ), that meant dns/dncp/iptables/git/squid servers were down. Git server was not critical for my workflow, as I proceed working on stuff but without pushing to git, good thing was I had local repository synced before card died, so was easy to go back.

# aptitude install -y git 
# useradd -m egit 
# su - egit
$ mkdir egit .ssh; cd egit; git init --bare

Added my key ( I do not know more elegant approach for keys than this ), by opening /home/elvir/.ssh/ on client machine ( then one I use for regular work ) and adding and adding it to .ssh/authorised_keys on git server side.
One more thing would be to edit /etc/password and for git user change default shell from /bin/shell to /usr/bin/git-shell. After this, it was easy to push stuff to git server and proceed with usual workflow ( git pull/push/commit… )


#git, #git-server