chiark / gitweb /
ipif: service-wrap: implementation, get args to service right
[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
f07baecf 18Create a "userv-git" user that will run the outer part of the git-daemon.
e9fec26a
TF
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
d36c5f7b 36find its global git-urlmap config.
e9fec26a
TF
37
38The git-daemon parses the request from the network and uses the global
d36c5f7b
IJ
39git-urlmap config to determine which user will run the requested
40service. It invokes userv for the request to be performed. The most
e9fec26a
TF
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
d36c5f7b 45The git-daemon will pass any service beginning git- to userv. The
e9fec26a
TF
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
d36c5f7b 50service. It passes the global and per-user git-urlmap configs to the
e9fec26a 51git-service script to determine where in the filesyetem the requested
d36c5f7b
IJ
52repository is. Later urlmap entries override the choices made by
53earlier ones.
e9fec26a
TF
54
55If a repository is located, the git-service script runs the requested
56service, which is simply the git program with the same name.
57
58
d36c5f7b
IJ
59Configuration:
60--------------
61
70b9d2e0 62See "git-urlmap" for syntax description and an example.
d36c5f7b
IJ
63
64
e9fec26a 65----------------------------------------------
d36c5f7b
IJ
66This was written by Tony Finch <dot@dotat.at> and subsequently
67heavily modified by Ian Jackson <ijackson@chiark.greenend.org.uk>
e9fec26a 68http://creativecommons.org/publicdomain/zero/1.0/