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