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