chiark / gitweb /
git-daemon: add Makefile and documentation.
[userv-utils] / git-daemon / README
CommitLineData
e9fec26a
TF
1userv-git-daemon is a replacement for the standard git daemon,
2which provides anonymous remote access to git repositories.
3
4It uses userv to invoke the service requested by the client, and users
5can configure it to map git:// URLs to repositories and enable and
6disable services as they see fit, without intervention from the system
7administrator.
8
9
10To install:
11-----------
12
13Adjust the paths in ../settings.make as necessary.
14userv-git-daemon uses $(libuserv), $(etcuserv), and $(services).
15
16Type make install.
17
18Create a "git" user that will run the outer part of the git-daemon.
19Ensure your /etc/services contains a line like "git 9418/tcp".
20
21Insert the inetd.conf fragment into your /etc/inetd.conf
22and tell inetd to reload.
23
24As a test user, create a 'public-git' directory, and copy a bare git
25repository into it, e.g.
26 git clone --bare git://dotat.at/unifdef.git public-git/unifdef.git
27
28This repository should now be visible:
29 git ls-remote git://localhost/~test/unifdef.git
30
31
32Operation:
33----------
34
35The userv-git-daemon is invoked by inetd which also tells it where to
36find its global git-urlmap script.
37
38The git-daemon parses the request from the network and uses the global
39git-urlmap script to determine which user will run the requested
40service. It invokes userv for the request to be performed. The most
41common service is git-upload-pack, which is confusingly named: it
42uploads from the repository to the network; other services supported
43by git are git-upload-archive and git-receive-pack.
44
45The git-daemon will pass any service beginning git- to userv. The
46userv configuration determines which services may be requested. This
47package includes example git-upload-pack service configurations.
48
49The service configuration uses the git-service script to run the
50service. It passes the global and per-user git-urlmap scripts to the
51git-service script to determine where in the filesyetem the requested
52repository is. Later urlmap scripts override the choices made by
53earlier ones. See the sample git-urlmap script for details of the
54variables they can examine and set.
55
56If a repository is located, the git-service script runs the requested
57service, which is simply the git program with the same name.
58
59
60----------------------------------------------
61This was written by Tony Finch <dot@dotat.at>
62You may do anything with it, at your own risk.
63http://creativecommons.org/publicdomain/zero/1.0/