Home Explore Blog CI



git

4th chunk of `Documentation/git-daemon.adoc`
558563a2e5acd35b604c7e0a7ddd7da538773e39cca159900000000100000888
 declines the service.

_<directory>_::
	The remaining arguments provide a list of directories. If any
	directories are specified, then the `git-daemon` process will
	serve a requested directory only if it is contained in one of
	these directories. If `--strict-paths` is specified, then the
	requested directory must match one of these directories exactly.

SERVICES
--------

These services can be globally enabled/disabled using the
command-line options of this command.  If finer-grained
control is desired (e.g. to allow `git archive` to be run
against only in a few selected repositories the daemon serves),
the per-repository configuration file can be used to enable or
disable them.

upload-pack::
	This serves `git fetch-pack` and `git ls-remote`
	clients.  It is enabled by default, but a repository can
	disable it by setting `daemon.uploadpack` configuration
	item to `false`.

upload-archive::
	This serves `git archive --remote`.  It is disabled by
	default, but a repository can enable it by setting
	`daemon.uploadarch` configuration item to `true`.

receive-pack::
	This serves `git send-pack` clients, allowing anonymous
	push.  It is disabled by default, as there is _no_
	authentication in the protocol (in other words, anybody
	can push anything into the repository, including removal
	of refs).  This is solely meant for a closed LAN setting
	where everybody is friendly.  This service can be
	enabled by setting `daemon.receivepack` configuration item to
	`true`.

EXAMPLES
--------
We assume the following in /etc/services::
+
------------
$ grep 9418 /etc/services
git		9418/tcp		# Git Version Control System
------------

'git daemon' as inetd server::
	To set up 'git daemon' as an inetd service that handles any
	repository within `/pub/foo` or `/pub/bar`, place an entry like
	the following into `/etc/inetd` all on one line:
+
------------------------------------------------
	git stream tcp nowait nobody  /usr/bin/git
		git daemon --inetd --verbose --export-all
		/pub/foo /pub/bar
------------------------------------------------


'git daemon' as inetd server for virtual hosts::
	To set up 'git daemon' as an inetd service that handles
	repositories

Title: Git Daemon Services and Examples
Summary
The git-daemon command supports various services such as upload-pack, upload-archive, and receive-pack, which can be enabled or disabled globally or at the repository level, and provides examples of setting up git daemon as an inetd server for handling repositories, including configuration for virtual hosts and specific directory paths.