Dabbling with Debian: Git Daemon
This is going to be my first series ever in blogging. As I am not very regular in terms of publishing my blogs, I am not sure about how regularly I can post to this series either, but I can only commit my sincerest efforts in trying.
Debian has been my standard OS for most of my home computers for a while now, and I have been fascinated by the relative stability and robustness of a completely open source platform. For most packages available on Debian, the Debian Wiki offers plenty of documentation.
Occasionally though, you do come across a few stray packages lacking the required amount of documentation.
I was trying to setup my own Debian Git server for hosting some personal codebases, and was having a pretty hard time with Gitlab, and I didn’t want to go the Gogs way either (what’s the point of a personal repository if I have to fall back on a Google product?)
I decided to go with the lackluster gitweb package and simply use the git-daemon to access my repositories over the network. Installing gitweb was a breeeze with some help from this Howtoforge article.
Installing git-daemon is as simple as this:
apt-get install git-daemon-sysvinit
However, contrary to the command on the Howtoforge site article the command to run a standard daemon was simply:
service git-daemon start|restart|status
So where is this service picking up it’s parameters from? A bit of dabbling reveals:
emacs /etc/defaults/git-daemon
Now on this file make sure you have the following lines:
GIT_DAEMON_ENABLE=true # daemon won’t run unless true
GIT_DAEMON_USER=gitdaemon
GIT_DAEMON_BASE_PATH=/var/cache/git
GIT_DAEMON_DIRECTORY=/var/cache/git
So there you go. Time for me to go hack some more stuffs, but enjoy fiddling with git-daemon till then.