How do you setup git-daemon on Ubuntu?
Git is by far my favorite version control system I’ve used. I use it all the time, and one of it’s benefits is how easy it is to share code. I usually just send someone the link to gitweb and they can look at my code there. Other times people give me their public key, and they can clone my stuff over ssh. But just recently I wanted to have a way to easily allow anonymous readonly access. I was surprised to find that this isn’t exactly straightforward on Ubuntu, but here’s how I got it working…
I’ve not tried, but I bet Gentoo already has this sorted out. Here’s how you do it on Ubuntu:
sudo apt-get install git-daemon-run sudo runsvdir /etc/service & sudo vi /etc/sv/git-daemon/run -> I changed the exec line to look like this: -> exec git-daemon –verbose –base-path=/var/git sudo /etc/init.d/git-daemon-run start touch /var/git/myrepo.git/git-daemon-export-ok git clone git://my-box/myrepo.git myrepo
That seemed to do it :)