aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTommi Virtanen <tv@eagain.net>2007-11-25 18:14:29 +0200
committerTommi Virtanen <tv@eagain.net>2007-11-25 18:14:29 +0200
commitd875e0fe5a5d04f0e774d4c51a374924141fc9f4 (patch)
treec62078b560fce80cba941d5493a4025de54a7042
parentAdd TODO note. (diff)
downloadgitosis-gentoo-d875e0fe5a5d04f0e774d4c51a374924141fc9f4.tar.gz
gitosis-gentoo-d875e0fe5a5d04f0e774d4c51a374924141fc9f4.tar.bz2
gitosis-gentoo-d875e0fe5a5d04f0e774d4c51a374924141fc9f4.zip
Add instructions for using git-daemon.
-rw-r--r--README.rst22
-rw-r--r--etc-event.d-local-git-daemon11
2 files changed, 33 insertions, 0 deletions
diff --git a/README.rst b/README.rst
index 1d3813e..b381ee3 100644
--- a/README.rst
+++ b/README.rst
@@ -136,6 +136,28 @@ Example configuration
:literal:
+Using git-daemon
+================
+
+Anonymous read-only access to ``git`` repositories is provided by
+``git-daemon``, which is distributed as part of ``git``. But
+``gitosis`` will still help you manage it: setting ``daemon = yes`` in
+your ``gitosis.conf``, either globally in ``[gitosis]`` or
+per-repository under ``[repo REPOSITORYNAME]``, makes ``gitosis``
+create the ``git-daemon-export-ok`` files in those repository, thus
+telling ``git-daemon`` that publishing those repositories is ok.
+
+To actually run ``git-daemon`` in Ubuntu, put this in
+``/etc/event.d/local-git-daemon``:
+
+.. include:: etc-event.d-local-git-daemon
+ :literal:
+
+For other operating systems, use a similar invocation in an ``init.d``
+script, ``/etc/inittab``, ``inetd.conf``, ``runit``, or something like
+that (good luck).
+
+
Contact
=======
diff --git a/etc-event.d-local-git-daemon b/etc-event.d-local-git-daemon
new file mode 100644
index 0000000..e1349a9
--- /dev/null
+++ b/etc-event.d-local-git-daemon
@@ -0,0 +1,11 @@
+start on startup
+stop on shutdown
+
+exec /usr/bin/git-daemon \
+ --user=git --group=git \
+ --user-path=public-git \
+ --verbose \
+ --reuseaddr \
+ --base-path=/srv/example.com/git/repositories/ \
+ /srv/example.com/git/repositories/
+respawn