userv-git-daemon is a replacement for the standard git daemon, which provides anonymous remote access to git repositories. It uses userv to invoke the service requested by the client, and users can configure it to map git:// URLs to repositories and enable and disable services as they see fit, without intervention from the system administrator. To install: ----------- Adjust the paths in ../settings.make as necessary. userv-git-daemon uses $(libuserv), $(etcuserv), and $(services). Type make install. Create a "git" user that will run the outer part of the git-daemon. Ensure your /etc/services contains a line like "git 9418/tcp". Insert the inetd.conf fragment into your /etc/inetd.conf and tell inetd to reload. As a test user, create a 'public-git' directory, and copy a bare git repository into it, e.g. git clone --bare git://dotat.at/unifdef.git public-git/unifdef.git This repository should now be visible: git ls-remote git://localhost/~test/unifdef.git Operation: ---------- The userv-git-daemon is invoked by inetd which also tells it where to find its global git-urlmap config. The git-daemon parses the request from the network and uses the global git-urlmap config to determine which user will run the requested service. It invokes userv for the request to be performed. The most common service is git-upload-pack, which is confusingly named: it uploads from the repository to the network; other services supported by git are git-upload-archive and git-receive-pack. The git-daemon will pass any service beginning git- to userv. The userv configuration determines which services may be requested. This package includes example git-upload-pack service configurations. The service configuration uses the git-service script to run the service. It passes the global and per-user git-urlmap configs to the git-service script to determine where in the filesyetem the requested repository is. Later urlmap entries override the choices made by earlier ones. If a repository is located, the git-service script runs the requested service, which is simply the git program with the same name. Configuration: -------------- See "git-urlmap" for syntax description and an example. ---------------------------------------------- This was written by Tony Finch and subsequently heavily modified by Ian Jackson http://creativecommons.org/publicdomain/zero/1.0/