gitweb: Fix thinko in git_tags and git_heads
[git/git.git] / Documentation / git-daemon.txt
CommitLineData
7fc9d69f
JH
1git-daemon(1)
2=============
3
4NAME
5----
7bd7f280 6git-daemon - A really simple server for git repositories
7fc9d69f
JH
7
8SYNOPSIS
9--------
353ce815 10[verse]
2707da9c 11'git-daemon' [--verbose] [--syslog] [--inetd | --port=n] [--export-all]
b21c31c9 12 [--timeout=n] [--init-timeout=n] [--strict-paths]
603968d2 13 [--base-path=path] [--user-path | --user-path=path]
355f5412
JH
14 [--enable=service] [--disable=service]
15 [--allow-override=service] [--forbid-override=service]
16 [--reuseaddr] [--detach] [--pid-file=file]
17 [--user=user [--group=group]] [directory...]
7fc9d69f
JH
18
19DESCRIPTION
20-----------
62cd033d 21A really simple TCP git daemon that normally listens on port "DEFAULT_GIT_PORT"
355f5412
JH
22aka 9418. It waits for a connection asking for a service, and will serve
23that service if it is enabled.
7fc9d69f 24
62cd033d
LAS
25It verifies that the directory has the magic file "git-daemon-export-ok", and
26it will refuse to export any git directory that hasn't explicitly been marked
2707da9c
PB
27for export this way (unless the '--export-all' parameter is specified). If you
28pass some directory paths as 'git-daemon' arguments, you can further restrict
29the offers to a whitelist comprising of those.
62cd033d 30
355f5412
JH
31By default, only `upload-pack` service is enabled, which serves
32`git-fetch-pack` and `git-peek-remote` clients that are invoked
33from `git-fetch`, `git-ls-remote`, and `git-clone`.
34
35This is ideally suited for read-only updates, i.e., pulling from
36git repositories.
7fc9d69f
JH
37
38OPTIONS
39-------
ce335fe0 40--strict-paths::
4dbd1352
AE
41 Match paths exactly (i.e. don't allow "/foo/repo" when the real path is
42 "/foo/repo.git" or "/foo/repo/.git") and don't do user-relative paths.
43 git-daemon will refuse to start when this option is enabled and no
44 whitelist is specified.
45
b21c31c9
PB
46--base-path::
47 Remap all the path requests as relative to the given path.
48 This is sort of "GIT root" - if you run git-daemon with
49 '--base-path=/srv/git' on example.com, then if you later try to pull
50 'git://example.com/hello.git', `git-daemon` will interpret the path
603968d2 51 as '/srv/git/hello.git'.
b21c31c9 52
2707da9c
PB
53--export-all::
54 Allow pulling from all directories that look like GIT repositories
4dbd1352 55 (have the 'objects' and 'refs' subdirectories), even if they
2707da9c
PB
56 do not have the 'git-daemon-export-ok' file.
57
62cd033d 58--inetd::
bce8230d 59 Have the server run as an inetd service. Implies --syslog.
7fc9d69f 60
62cd033d
LAS
61--port::
62 Listen on an alternative port.
7fc9d69f 63
2707da9c
PB
64--init-timeout::
65 Timeout between the moment the connection is established and the
66 client request is received (typically a rather low value, since
67 that should be basically immediate).
68
69--timeout::
70 Timeout for specific client sub-requests. This includes the time
71 it takes for the server to process the sub-request and time spent
72 waiting for next client's request.
73
9048fe1c
PB
74--syslog::
75 Log to syslog instead of stderr. Note that this option does not imply
76 --verbose, thus by default only error conditions will be logged.
77
603968d2
JH
78--user-path, --user-path=path::
79 Allow ~user notation to be used in requests. When
80 specified with no parameter, requests to
81 git://host/~alice/foo is taken as a request to access
82 'foo' repository in the home directory of user `alice`.
83 If `--user-path=path` is specified, the same request is
84 taken as a request to access `path/foo` repository in
85 the home directory of user `alice`.
86
b5cf3c8b
PB
87--verbose::
88 Log details about the incoming connections and requested files.
89
6c35119a
ML
90--reuseaddr::
91 Use SO_REUSEADDR when binding the listening socket.
92 This allows the server to restart without waiting for
93 old connections to time out.
94
95--detach::
96 Detach from the shell. Implies --syslog.
97
98--pid-file=file::
99 Save the process id in 'file'.
100
678dac6b
TS
101--user=user, --group=group::
102 Change daemon's uid and gid before entering the service loop.
103 When only `--user` is given without `--group`, the
104 primary group ID for the user is used. The values of
105 the option are given to `getpwnam(3)` and `getgrnam(3)`
106 and numeric IDs are not supported.
107+
108Giving these options is an error when used with `--inetd`; use
109the facility of inet daemon to achieve the same before spawning
110`git-daemon` if needed.
111
355f5412
JH
112--enable-service, --disable-service::
113 Enable/disable the service site-wide per default. Note
114 that a service disabled site-wide can still be enabled
115 per repository if it is marked overridable and the
116 repository enables the service with an configuration
117 item.
118
119--allow-override, --forbid-override::
120 Allow/forbid overriding the site-wide default with per
121 repository configuration. By default, all the services
122 are overridable.
123
4dbd1352
AE
124<directory>::
125 A directory to add to the whitelist of allowed directories. Unless
126 --strict-paths is specified this will also include subdirectories
127 of each named directory.
128
355f5412
JH
129SERVICES
130--------
131
132upload-pack::
133 This serves `git-fetch-pack` and `git-peek-remote`
134 clients. It is enabled by default, but a repository can
135 disable it by setting `daemon.uploadpack` configuration
136 item to `false`.
137
7fc9d69f
JH
138Author
139------
4dbd1352
AE
140Written by Linus Torvalds <torvalds@osdl.org>, YOSHIFUJI Hideaki
141<yoshfuji@linux-ipv6.org> and the git-list <git@vger.kernel.org>
7fc9d69f
JH
142
143Documentation
144--------------
145Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
146
147GIT
148---
a7154e91 149Part of the gitlink:git[7] suite
7fc9d69f 150