]> asedeno.scripts.mit.edu Git - git.git/blob - Documentation/git-daemon.txt
Merge branch 'gl/web'
[git.git] / Documentation / git-daemon.txt
1 git-daemon(1)
2 =============
3
4 NAME
5 ----
6 git-daemon - A really simple server for git repositories
7
8 SYNOPSIS
9 --------
10 [verse]
11 'git-daemon' [--verbose] [--syslog] [--inetd | --port=n] [--export-all]
12              [--timeout=n] [--init-timeout=n] [--strict-paths]
13              [--base-path=path] [--user-path | --user-path=path]
14              [--reuseaddr] [--detach] [--pid-file=file]
15              [--user=user [--group=group]] [directory...]
16
17 DESCRIPTION
18 -----------
19 A really simple TCP git daemon that normally listens on port "DEFAULT_GIT_PORT"
20 aka 9418. It waits for a connection, and will just execute "git-upload-pack"
21 when it gets one.
22
23 It's careful in that there's a magic request-line that gives the command and
24 what directory to upload, and it verifies that the directory is OK.
25
26 It verifies that the directory has the magic file "git-daemon-export-ok", and
27 it will refuse to export any git directory that hasn't explicitly been marked
28 for export this way (unless the '--export-all' parameter is specified). If you
29 pass some directory paths as 'git-daemon' arguments, you can further restrict
30 the offers to a whitelist comprising of those.
31
32 This is ideally suited for read-only updates, i.e., pulling from git repositories.
33
34 OPTIONS
35 -------
36 --strict-paths::
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
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
47         as '/srv/git/hello.git'.
48
49 --export-all::
50         Allow pulling from all directories that look like GIT repositories
51         (have the 'objects' and 'refs' subdirectories), even if they
52         do not have the 'git-daemon-export-ok' file.
53
54 --inetd::
55         Have the server run as an inetd service. Implies --syslog.
56
57 --port::
58         Listen on an alternative port.
59
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
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
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
83 --verbose::
84         Log details about the incoming connections and requested files.
85
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
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 +
104 Giving these options is an error when used with `--inetd`; use
105 the facility of inet daemon to achieve the same before spawning
106 `git-daemon` if needed.
107
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
113 Author
114 ------
115 Written by Linus Torvalds <torvalds@osdl.org>, YOSHIFUJI Hideaki
116 <yoshfuji@linux-ipv6.org> and the git-list <git@vger.kernel.org>
117
118 Documentation
119 --------------
120 Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
121
122 GIT
123 ---
124 Part of the gitlink:git[7] suite
125