Git on Ubuntu

From MattWiki
noteThis Page was written with Ubuntu 12.04 LTS in mind, and may not work correctly with other versions or distributions.


Creating a git server

Start out by downloading the needed packets.

apt-get -y install git-daemon-run
echo "#!/bin/sh
exec 2>&1
echo 'git-daemon starting.'
exec chpst -ugitdaemon \
    /usr/lib/git-core/git-daemon --verbose \
    --export-all --base-path=/home/git" > /etc/sv/git-daemon/run
ufw allow 9418/tcp
sv restart git-daemon