Skip to content

Commit bdd7379

Browse files
committed
git-daemon(1): assorted improvements.
Jari Aalto noticed a handful places in git-daemon documentation that need to be improved. * --inetd makes --pid-file to be ignored, in addition to --user and --group * receive-pack service was not described at all. We should, if only to warn about the security implications of it. * There was no example of per repository configuration. Signed-off-by: Junio C Hamano <[email protected]>
1 parent 99c7ff3 commit bdd7379

File tree

1 file changed

+34
-2
lines changed

1 file changed

+34
-2
lines changed

Documentation/git-daemon.txt

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ OPTIONS
124124
Detach from the shell. Implies --syslog.
125125

126126
--pid-file=file::
127-
Save the process id in 'file'.
127+
Save the process id in 'file'. Ignored when the daemon
128+
is run under `--inetd`.
128129

129130
--user=user, --group=group::
130131
Change daemon's uid and gid before entering the service loop.
@@ -157,14 +158,33 @@ the facility of inet daemon to achieve the same before spawning
157158
SERVICES
158159
--------
159160

161+
These services can be globally enabled/disabled using the
162+
command line options of this command. If a finer-grained
163+
control is desired (e.g. to allow `git-archive` to be run
164+
against only in a few selected repositories the daemon serves),
165+
the per-repository configuration file can be used to enable or
166+
disable them.
167+
160168
upload-pack::
161169
This serves `git-fetch-pack` and `git-peek-remote`
162170
clients. It is enabled by default, but a repository can
163171
disable it by setting `daemon.uploadpack` configuration
164172
item to `false`.
165173

166174
upload-archive::
167-
This serves `git-archive --remote`.
175+
This serves `git-archive --remote`. It is disabled by
176+
default, but a repository can enable it by setting
177+
`daemon.uploadarchive` configuration item to `true`.
178+
179+
receive-pack::
180+
This serves `git-send-pack` clients, allowing anonymous
181+
push. It is disabled by default, as there is _no_
182+
authentication in the protocol (in other words, anybody
183+
can push anything into the repository, including removal
184+
of refs). This is solely meant for a closed LAN setting
185+
where everybody is friendly. This service can be
186+
enabled by `daemon.receivepack` configuration item to
187+
`true`.
168188

169189
EXAMPLES
170190
--------
@@ -229,6 +249,18 @@ Repositories can still be accessed by hostname though, assuming
229249
they correspond to these IP addresses.
230250

231251

252+
To enable `git-archive --remote` and disable `git-fetch` against
253+
a repository, have the following in the configuration file in the
254+
repository (that is the file 'config' next to 'HEAD', 'refs' and
255+
'objects').
256+
+
257+
----------------------------------------------------------------
258+
[daemon]
259+
uploadpack = false
260+
uploadarchive = true
261+
----------------------------------------------------------------
262+
263+
232264
Author
233265
------
234266
Written by Linus Torvalds <[email protected]>, YOSHIFUJI Hideaki

0 commit comments

Comments
 (0)