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 [--reuseaddr] [--detach] [--pid-file=file]
15 [--user=user [--group=group]] [directory...]
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"
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.
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.
32 This is ideally suited for read-only updates, i.e., pulling from git repositories.
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.
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'.
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.
55 Have the server run as an inetd service. Implies --syslog.
58 Listen on an alternative port.
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).
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.
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.
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`.
84 Log details about the incoming connections and requested files.
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.
92 Detach from the shell. Implies --syslog.
95 Save the process id in 'file'.
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.
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.
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.
115 Written by Linus Torvalds <torvalds@osdl.org>, YOSHIFUJI Hideaki
116 <yoshfuji@linux-ipv6.org> and the git-list <git@vger.kernel.org>
120 Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
124 Part of the gitlink:git[7] suite