6 git-daemon - A really simple server for git repositories
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 [--enable=service] [--disable=service]
15 [--allow-override=service] [--forbid-override=service]
16 [--reuseaddr] [--detach] [--pid-file=file]
17 [--user=user [--group=group]] [directory...]
21 A really simple TCP git daemon that normally listens on port "DEFAULT_GIT_PORT"
22 aka 9418. It waits for a connection asking for a service, and will serve
23 that service if it is enabled.
25 It verifies that the directory has the magic file "git-daemon-export-ok", and
26 it will refuse to export any git directory that hasn't explicitly been marked
27 for export this way (unless the '--export-all' parameter is specified). If you
28 pass some directory paths as 'git-daemon' arguments, you can further restrict
29 the offers to a whitelist comprising of those.
31 By default, only `upload-pack` service is enabled, which serves
32 `git-fetch-pack` and `git-peek-remote` clients that are invoked
33 from `git-fetch`, `git-ls-remote`, and `git-clone`.
35 This is ideally suited for read-only updates, i.e., pulling from
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.
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
51 as '/srv/git/hello.git'.
54 Allow pulling from all directories that look like GIT repositories
55 (have the 'objects' and 'refs' subdirectories), even if they
56 do not have the 'git-daemon-export-ok' file.
59 Have the server run as an inetd service. Implies --syslog.
62 Listen on an alternative port.
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).
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.
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.
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`.
88 Log details about the incoming connections and requested files.
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.
96 Detach from the shell. Implies --syslog.
99 Save the process id in 'file'.
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.
108 Giving these options is an error when used with `--inetd`; use
109 the facility of inet daemon to achieve the same before spawning
110 `git-daemon` if needed.
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
119 --allow-override, --forbid-override::
120 Allow/forbid overriding the site-wide default with per
121 repository configuration. By default, all the services
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.
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
140 Written by Linus Torvalds <torvalds@osdl.org>, YOSHIFUJI Hideaki
141 <yoshfuji@linux-ipv6.org> and the git-list <git@vger.kernel.org>
145 Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
149 Part of the gitlink:git[7] suite