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 <gitster@pobox.com>
Junio C Hamano committed
Aug 29, 2007 at 03:32 UTC
bdd7379566cf7b1f1c9bfe42e794c8f1821971f7
1 file changed
+34
-2
Documentation/git-daemon.txt
+34
-2
@@ -124,7 +124,8 @@ OPTIONS
124
Detach from the shell. Implies --syslog.
125
126
--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`.
129
130
--user=user, --group=group::
131
Change daemon's uid and gid before entering the service loop.
@@ -157,6 +158,13 @@ the facility of inet daemon to achieve the same before spawning
158
SERVICES
159
--------
160
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
+
168
upload-pack::
169
This serves `git-fetch-pack` and `git-peek-remote`
170
clients. It is enabled by default, but a repository can
@@ -164,7 +172,19 @@ upload-pack::
172
item to `false`.
173
174
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`.
188
189
EXAMPLES
190
--------
@@ -229,6 +249,18 @@ Repositories can still be accessed by hostname though, assuming
249
they correspond to these IP addresses.
250
251
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
+
264
Author
265
------
266
Written by Linus Torvalds <torvalds@osdl.org>, YOSHIFUJI Hideaki