| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" |
| 2 | "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> |
| 4 | <head> |
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 6 | <meta name="generator" content="AsciiDoc 8.2.5" /> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 7 | <style type="text/css"> |
| 8 | /* Debug borders */ |
| 9 | p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 { |
| 10 | /* |
| 11 | border: 1px solid red; |
| 12 | */ |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | margin: 1em 5% 1em 5%; |
| 17 | } |
| 18 | |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 19 | a { |
| 20 | color: blue; |
| 21 | text-decoration: underline; |
| 22 | } |
| 23 | a:visited { |
| 24 | color: fuchsia; |
| 25 | } |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 26 | |
| 27 | em { |
| 28 | font-style: italic; |
| 29 | } |
| 30 | |
| 31 | strong { |
| 32 | font-weight: bold; |
| 33 | } |
| 34 | |
| 35 | tt { |
| 36 | color: navy; |
| 37 | } |
| 38 | |
| 39 | h1, h2, h3, h4, h5, h6 { |
| 40 | color: #527bbd; |
| 41 | font-family: sans-serif; |
| 42 | margin-top: 1.2em; |
| 43 | margin-bottom: 0.5em; |
| 44 | line-height: 1.3; |
| 45 | } |
| 46 | |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 47 | h1, h2, h3 { |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 48 | border-bottom: 2px solid silver; |
| 49 | } |
| 50 | h2 { |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 51 | padding-top: 0.5em; |
| 52 | } |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 53 | h3 { |
| 54 | float: left; |
| 55 | } |
| 56 | h3 + * { |
| 57 | clear: left; |
| 58 | } |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 59 | |
| 60 | div.sectionbody { |
| 61 | font-family: serif; |
| 62 | margin-left: 0; |
| 63 | } |
| 64 | |
| 65 | hr { |
| 66 | border: 1px solid silver; |
| 67 | } |
| 68 | |
| 69 | p { |
| 70 | margin-top: 0.5em; |
| 71 | margin-bottom: 0.5em; |
| 72 | } |
| 73 | |
| 74 | pre { |
| 75 | padding: 0; |
| 76 | margin: 0; |
| 77 | } |
| 78 | |
| 79 | span#author { |
| 80 | color: #527bbd; |
| 81 | font-family: sans-serif; |
| 82 | font-weight: bold; |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 83 | font-size: 1.1em; |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 84 | } |
| 85 | span#email { |
| 86 | } |
| 87 | span#revision { |
| 88 | font-family: sans-serif; |
| 89 | } |
| 90 | |
| 91 | div#footer { |
| 92 | font-family: sans-serif; |
| 93 | font-size: small; |
| 94 | border-top: 2px solid silver; |
| 95 | padding-top: 0.5em; |
| 96 | margin-top: 4.0em; |
| 97 | } |
| 98 | div#footer-text { |
| 99 | float: left; |
| 100 | padding-bottom: 0.5em; |
| 101 | } |
| 102 | div#footer-badges { |
| 103 | float: right; |
| 104 | padding-bottom: 0.5em; |
| 105 | } |
| 106 | |
| 107 | div#preamble, |
| 108 | div.tableblock, div.imageblock, div.exampleblock, div.verseblock, |
| 109 | div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, |
| 110 | div.admonitionblock { |
| 111 | margin-right: 10%; |
| 112 | margin-top: 1.5em; |
| 113 | margin-bottom: 1.5em; |
| 114 | } |
| 115 | div.admonitionblock { |
| 116 | margin-top: 2.5em; |
| 117 | margin-bottom: 2.5em; |
| 118 | } |
| 119 | |
| 120 | div.content { /* Block element content. */ |
| 121 | padding: 0; |
| 122 | } |
| 123 | |
| 124 | /* Block element titles. */ |
| 125 | div.title, caption.title { |
| 126 | font-family: sans-serif; |
| 127 | font-weight: bold; |
| 128 | text-align: left; |
| 129 | margin-top: 1.0em; |
| 130 | margin-bottom: 0.5em; |
| 131 | } |
| 132 | div.title + * { |
| 133 | margin-top: 0; |
| 134 | } |
| 135 | |
| 136 | td div.title:first-child { |
| 137 | margin-top: 0.0em; |
| 138 | } |
| 139 | div.content div.title:first-child { |
| 140 | margin-top: 0.0em; |
| 141 | } |
| 142 | div.content + div.title { |
| 143 | margin-top: 0.0em; |
| 144 | } |
| 145 | |
| 146 | div.sidebarblock > div.content { |
| 147 | background: #ffffee; |
| 148 | border: 1px solid silver; |
| 149 | padding: 0.5em; |
| 150 | } |
| 151 | |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 152 | div.listingblock { |
| 153 | margin-right: 0%; |
| 154 | } |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 155 | div.listingblock > div.content { |
| 156 | border: 1px solid silver; |
| 157 | background: #f4f4f4; |
| 158 | padding: 0.5em; |
| 159 | } |
| 160 | |
| 161 | div.quoteblock > div.content { |
| 162 | padding-left: 2.0em; |
| 163 | } |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 164 | |
| 165 | div.attribution { |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 166 | text-align: right; |
| 167 | } |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 168 | div.verseblock + div.attribution { |
| 169 | text-align: left; |
| 170 | } |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 171 | |
| 172 | div.admonitionblock .icon { |
| 173 | vertical-align: top; |
| 174 | font-size: 1.1em; |
| 175 | font-weight: bold; |
| 176 | text-decoration: underline; |
| 177 | color: #527bbd; |
| 178 | padding-right: 0.5em; |
| 179 | } |
| 180 | div.admonitionblock td.content { |
| 181 | padding-left: 0.5em; |
| 182 | border-left: 2px solid silver; |
| 183 | } |
| 184 | |
| 185 | div.exampleblock > div.content { |
| 186 | border-left: 2px solid silver; |
| 187 | padding: 0.5em; |
| 188 | } |
| 189 | |
| 190 | div.verseblock div.content { |
| 191 | white-space: pre; |
| 192 | } |
| 193 | |
| 194 | div.imageblock div.content { padding-left: 0; } |
| 195 | div.imageblock img { border: 1px solid silver; } |
| 196 | span.image img { border-style: none; } |
| 197 | |
| 198 | dl { |
| 199 | margin-top: 0.8em; |
| 200 | margin-bottom: 0.8em; |
| 201 | } |
| 202 | dt { |
| 203 | margin-top: 0.5em; |
| 204 | margin-bottom: 0; |
| 205 | font-style: italic; |
| 206 | } |
| 207 | dd > *:first-child { |
| 208 | margin-top: 0; |
| 209 | } |
| 210 | |
| 211 | ul, ol { |
| 212 | list-style-position: outside; |
| 213 | } |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 214 | div.olist2 ol { |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 215 | list-style-type: lower-alpha; |
| 216 | } |
| 217 | |
| 218 | div.tableblock > table { |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 219 | border: 3px solid #527bbd; |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 220 | } |
| 221 | thead { |
| 222 | font-family: sans-serif; |
| 223 | font-weight: bold; |
| 224 | } |
| 225 | tfoot { |
| 226 | font-weight: bold; |
| 227 | } |
| 228 | |
| 229 | div.hlist { |
| 230 | margin-top: 0.8em; |
| 231 | margin-bottom: 0.8em; |
| 232 | } |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 233 | div.hlist td { |
| 234 | padding-bottom: 5px; |
| 235 | } |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 236 | td.hlist1 { |
| 237 | vertical-align: top; |
| 238 | font-style: italic; |
| 239 | padding-right: 0.8em; |
| 240 | } |
| 241 | td.hlist2 { |
| 242 | vertical-align: top; |
| 243 | } |
| 244 | |
| 245 | @media print { |
| 246 | div#footer-badges { display: none; } |
| 247 | } |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 248 | |
| 249 | div#toctitle { |
| 250 | color: #527bbd; |
| 251 | font-family: sans-serif; |
| 252 | font-size: 1.1em; |
| 253 | font-weight: bold; |
| 254 | margin-top: 1.0em; |
| 255 | margin-bottom: 0.1em; |
| 256 | } |
| 257 | |
| 258 | div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { |
| 259 | margin-top: 0; |
| 260 | margin-bottom: 0; |
| 261 | } |
| 262 | div.toclevel2 { |
| 263 | margin-left: 2em; |
| 264 | font-size: 0.9em; |
| 265 | } |
| 266 | div.toclevel3 { |
| 267 | margin-left: 4em; |
| 268 | font-size: 0.9em; |
| 269 | } |
| 270 | div.toclevel4 { |
| 271 | margin-left: 6em; |
| 272 | font-size: 0.9em; |
| 273 | } |
| 274 | include1::./stylesheets/xhtml11-manpage.css[] |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 275 | /* Workarounds for IE6's broken and incomplete CSS2. */ |
| 276 | |
| 277 | div.sidebar-content { |
| 278 | background: #ffffee; |
| 279 | border: 1px solid silver; |
| 280 | padding: 0.5em; |
| 281 | } |
| 282 | div.sidebar-title, div.image-title { |
| 283 | font-family: sans-serif; |
| 284 | font-weight: bold; |
| 285 | margin-top: 0.0em; |
| 286 | margin-bottom: 0.5em; |
| 287 | } |
| 288 | |
| 289 | div.listingblock div.content { |
| 290 | border: 1px solid silver; |
| 291 | background: #f4f4f4; |
| 292 | padding: 0.5em; |
| 293 | } |
| 294 | |
| 295 | div.quoteblock-content { |
| 296 | padding-left: 2.0em; |
| 297 | } |
| 298 | |
| 299 | div.exampleblock-content { |
| 300 | border-left: 2px solid silver; |
| 301 | padding-left: 0.5em; |
| 302 | } |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 303 | |
| 304 | /* IE6 sets dynamically generated links as visited. */ |
| 305 | div#toc a:visited { color: blue; } |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 306 | </style> |
| 307 | <title>git-daemon(1)</title> |
| 308 | </head> |
| 309 | <body> |
| 310 | <div id="header"> |
| 311 | <h1> |
| 312 | git-daemon(1) Manual Page |
| 313 | </h1> |
| 314 | <h2>NAME</h2> |
| 315 | <div class="sectionbody"> |
| 316 | <p>git-daemon - |
| Junio C Hamano | 0107892 | 2006-03-10 00:31:47 | [diff] [blame] | 317 | A really simple server for git repositories |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 318 | </p> |
| 319 | </div> |
| 320 | </div> |
| 321 | <h2>SYNOPSIS</h2> |
| 322 | <div class="sectionbody"> |
| Junio C Hamano | 235a91e | 2006-01-07 01:13:58 | [diff] [blame] | 323 | <div class="verseblock"> |
| Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 324 | <div class="content"><em>git daemon</em> [--verbose] [--syslog] [--export-all] |
| Junio C Hamano | fcb740a | 2008-08-31 06:32:05 | [diff] [blame] | 325 | [--timeout=n] [--init-timeout=n] [--max-connections=n] |
| 326 | [--strict-paths] [--base-path=path] [--base-path-relaxed] |
| 327 | [--user-path | --user-path=path] |
| Junio C Hamano | 47c1e3c | 2006-09-25 04:45:55 | [diff] [blame] | 328 | [--interpolated-path=pathtemplate] |
| Junio C Hamano | 032c631 | 2006-09-28 07:39:18 | [diff] [blame] | 329 | [--reuseaddr] [--detach] [--pid-file=file] |
| Junio C Hamano | 19ed368 | 2006-09-07 11:44:08 | [diff] [blame] | 330 | [--enable=service] [--disable=service] |
| 331 | [--allow-override=service] [--forbid-override=service] |
| Junio C Hamano | 032c631 | 2006-09-28 07:39:18 | [diff] [blame] | 332 | [--inetd | [--listen=host_or_ipaddr] [--port=n] [--user=user [--group=group]] |
| 333 | [directory…]</div></div> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 334 | </div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 335 | <h2 id="_description">DESCRIPTION</h2> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 336 | <div class="sectionbody"> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 337 | <div class="para"><p>A really simple TCP git daemon that normally listens on port "DEFAULT_GIT_PORT" |
| Junio C Hamano | 19ed368 | 2006-09-07 11:44:08 | [diff] [blame] | 338 | aka 9418. It waits for a connection asking for a service, and will serve |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 339 | that service if it is enabled.</p></div> |
| 340 | <div class="para"><p>It verifies that the directory has the magic file "git-daemon-export-ok", and |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 341 | it will refuse to export any git directory that hasn't explicitly been marked |
| 342 | for export this way (unless the <em>--export-all</em> parameter is specified). If you |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 343 | pass some directory paths as <em>git-daemon</em> arguments, you can further restrict |
| 344 | the offers to a whitelist comprising of those.</p></div> |
| 345 | <div class="para"><p>By default, only <tt>upload-pack</tt> service is enabled, which serves |
| 346 | <em>git-fetch-pack</em> and <em>git-ls-remote</em> clients, which are invoked |
| 347 | from <em>git-fetch</em>, <em>git-pull</em>, and <em>git-clone</em>.</p></div> |
| 348 | <div class="para"><p>This is ideally suited for read-only updates, i.e., pulling from |
| 349 | git repositories.</p></div> |
| 350 | <div class="para"><p>An <tt>upload-archive</tt> also exists to serve <em>git-archive</em>.</p></div> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 351 | </div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 352 | <h2 id="_options">OPTIONS</h2> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 353 | <div class="sectionbody"> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 354 | <div class="vlist"><dl> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 355 | <dt> |
| 356 | --strict-paths |
| 357 | </dt> |
| 358 | <dd> |
| 359 | <p> |
| 360 | Match paths exactly (i.e. don't allow "/foo/repo" when the real path is |
| 361 | "/foo/repo.git" or "/foo/repo/.git") and don't do user-relative paths. |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 362 | <em>git-daemon</em> will refuse to start when this option is enabled and no |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 363 | whitelist is specified. |
| 364 | </p> |
| 365 | </dd> |
| 366 | <dt> |
| Junio C Hamano | 4d04a40 | 2006-01-09 00:53:28 | [diff] [blame] | 367 | --base-path |
| 368 | </dt> |
| 369 | <dd> |
| 370 | <p> |
| 371 | Remap all the path requests as relative to the given path. |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 372 | This is sort of "GIT root" - if you run <em>git-daemon</em> with |
| Junio C Hamano | 4d04a40 | 2006-01-09 00:53:28 | [diff] [blame] | 373 | <em>--base-path=/srv/git</em> on example.com, then if you later try to pull |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 374 | <em>git://example.com/hello.git</em>, <em>git-daemon</em> will interpret the path |
| Junio C Hamano | 70fafca | 2006-02-06 08:02:01 | [diff] [blame] | 375 | as <em>/srv/git/hello.git</em>. |
| Junio C Hamano | 4d04a40 | 2006-01-09 00:53:28 | [diff] [blame] | 376 | </p> |
| 377 | </dd> |
| 378 | <dt> |
| Junio C Hamano | 0ddc94d | 2007-08-01 08:42:39 | [diff] [blame] | 379 | --base-path-relaxed |
| 380 | </dt> |
| 381 | <dd> |
| 382 | <p> |
| 383 | If --base-path is enabled and repo lookup fails, with this option |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 384 | <em>git-daemon</em> will attempt to lookup without prefixing the base path. |
| Junio C Hamano | 0ddc94d | 2007-08-01 08:42:39 | [diff] [blame] | 385 | This is useful for switching to --base-path usage, while still |
| 386 | allowing the old paths. |
| 387 | </p> |
| 388 | </dd> |
| 389 | <dt> |
| Junio C Hamano | 47c1e3c | 2006-09-25 04:45:55 | [diff] [blame] | 390 | --interpolated-path=pathtemplate |
| 391 | </dt> |
| 392 | <dd> |
| 393 | <p> |
| 394 | To support virtual hosting, an interpolated path template can be |
| 395 | used to dynamically construct alternate paths. The template |
| Junio C Hamano | 032c631 | 2006-09-28 07:39:18 | [diff] [blame] | 396 | supports %H for the target hostname as supplied by the client but |
| 397 | converted to all lowercase, %CH for the canonical hostname, |
| 398 | %IP for the server's IP address, %P for the port number, |
| Junio C Hamano | 47c1e3c | 2006-09-25 04:45:55 | [diff] [blame] | 399 | and %D for the absolute path of the named repository. |
| Junio C Hamano | 032c631 | 2006-09-28 07:39:18 | [diff] [blame] | 400 | After interpolation, the path is validated against the directory |
| 401 | whitelist. |
| Junio C Hamano | 47c1e3c | 2006-09-25 04:45:55 | [diff] [blame] | 402 | </p> |
| 403 | </dd> |
| 404 | <dt> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 405 | --export-all |
| 406 | </dt> |
| 407 | <dd> |
| 408 | <p> |
| 409 | Allow pulling from all directories that look like GIT repositories |
| 410 | (have the <em>objects</em> and <em>refs</em> subdirectories), even if they |
| 411 | do not have the <em>git-daemon-export-ok</em> file. |
| 412 | </p> |
| 413 | </dd> |
| 414 | <dt> |
| 415 | --inetd |
| 416 | </dt> |
| 417 | <dd> |
| 418 | <p> |
| 419 | Have the server run as an inetd service. Implies --syslog. |
| Junio C Hamano | 032c631 | 2006-09-28 07:39:18 | [diff] [blame] | 420 | Incompatible with --port, --listen, --user and --group options. |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 421 | </p> |
| 422 | </dd> |
| 423 | <dt> |
| Junio C Hamano | 032c631 | 2006-09-28 07:39:18 | [diff] [blame] | 424 | --listen=host_or_ipaddr |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 425 | </dt> |
| 426 | <dd> |
| 427 | <p> |
| Junio C Hamano | 032c631 | 2006-09-28 07:39:18 | [diff] [blame] | 428 | Listen on an a specific IP address or hostname. IP addresses can |
| 429 | be either an IPv4 address or an IPV6 address if supported. If IPv6 |
| 430 | is not supported, then --listen=hostname is also not supported and |
| 431 | --listen must be given an IPv4 address. |
| 432 | Incompatible with <em>--inetd</em> option. |
| 433 | </p> |
| 434 | </dd> |
| 435 | <dt> |
| 436 | --port=n |
| 437 | </dt> |
| 438 | <dd> |
| 439 | <p> |
| 440 | Listen on an alternative port. Incompatible with <em>--inetd</em> option. |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 441 | </p> |
| 442 | </dd> |
| 443 | <dt> |
| 444 | --init-timeout |
| 445 | </dt> |
| 446 | <dd> |
| 447 | <p> |
| 448 | Timeout between the moment the connection is established and the |
| 449 | client request is received (typically a rather low value, since |
| 450 | that should be basically immediate). |
| 451 | </p> |
| 452 | </dd> |
| 453 | <dt> |
| 454 | --timeout |
| 455 | </dt> |
| 456 | <dd> |
| 457 | <p> |
| 458 | Timeout for specific client sub-requests. This includes the time |
| 459 | it takes for the server to process the sub-request and time spent |
| 460 | waiting for next client's request. |
| 461 | </p> |
| 462 | </dd> |
| 463 | <dt> |
| Junio C Hamano | fcb740a | 2008-08-31 06:32:05 | [diff] [blame] | 464 | --max-connections |
| 465 | </dt> |
| 466 | <dd> |
| 467 | <p> |
| 468 | Maximum number of concurrent clients, defaults to 32. Set it to |
| 469 | zero for no limit. |
| 470 | </p> |
| 471 | </dd> |
| 472 | <dt> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 473 | --syslog |
| 474 | </dt> |
| 475 | <dd> |
| 476 | <p> |
| 477 | Log to syslog instead of stderr. Note that this option does not imply |
| 478 | --verbose, thus by default only error conditions will be logged. |
| 479 | </p> |
| 480 | </dd> |
| 481 | <dt> |
| Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 482 | --user-path |
| 483 | </dt> |
| 484 | <dt> |
| 485 | --user-path=path |
| Junio C Hamano | 70fafca | 2006-02-06 08:02:01 | [diff] [blame] | 486 | </dt> |
| 487 | <dd> |
| 488 | <p> |
| Junio C Hamano | 4604fe5 | 2008-09-19 06:37:10 | [diff] [blame] | 489 | Allow ~user notation to be used in requests. When |
| Junio C Hamano | 70fafca | 2006-02-06 08:02:01 | [diff] [blame] | 490 | specified with no parameter, requests to |
| Junio C Hamano | 4604fe5 | 2008-09-19 06:37:10 | [diff] [blame] | 491 | git://host/~alice/foo is taken as a request to access |
| Junio C Hamano | 70fafca | 2006-02-06 08:02:01 | [diff] [blame] | 492 | <em>foo</em> repository in the home directory of user <tt>alice</tt>. |
| 493 | If <tt>--user-path=path</tt> is specified, the same request is |
| 494 | taken as a request to access <tt>path/foo</tt> repository in |
| 495 | the home directory of user <tt>alice</tt>. |
| 496 | </p> |
| 497 | </dd> |
| 498 | <dt> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 499 | --verbose |
| 500 | </dt> |
| 501 | <dd> |
| 502 | <p> |
| 503 | Log details about the incoming connections and requested files. |
| 504 | </p> |
| 505 | </dd> |
| 506 | <dt> |
| Junio C Hamano | abb53dc | 2006-07-28 05:14:12 | [diff] [blame] | 507 | --reuseaddr |
| 508 | </dt> |
| 509 | <dd> |
| 510 | <p> |
| 511 | Use SO_REUSEADDR when binding the listening socket. |
| 512 | This allows the server to restart without waiting for |
| 513 | old connections to time out. |
| 514 | </p> |
| 515 | </dd> |
| 516 | <dt> |
| 517 | --detach |
| 518 | </dt> |
| 519 | <dd> |
| 520 | <p> |
| 521 | Detach from the shell. Implies --syslog. |
| 522 | </p> |
| 523 | </dd> |
| 524 | <dt> |
| 525 | --pid-file=file |
| 526 | </dt> |
| 527 | <dd> |
| 528 | <p> |
| Junio C Hamano | 21e7f9c | 2007-08-31 07:56:26 | [diff] [blame] | 529 | Save the process id in <em>file</em>. Ignored when the daemon |
| 530 | is run under <tt>--inetd</tt>. |
| Junio C Hamano | abb53dc | 2006-07-28 05:14:12 | [diff] [blame] | 531 | </p> |
| 532 | </dd> |
| 533 | <dt> |
| Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 534 | --user=user |
| 535 | </dt> |
| 536 | <dt> |
| 537 | --group=group |
| Junio C Hamano | 9adfc6a | 2006-08-28 07:18:38 | [diff] [blame] | 538 | </dt> |
| 539 | <dd> |
| 540 | <p> |
| 541 | Change daemon's uid and gid before entering the service loop. |
| 542 | When only <tt>--user</tt> is given without <tt>--group</tt>, the |
| 543 | primary group ID for the user is used. The values of |
| 544 | the option are given to <tt>getpwnam(3)</tt> and <tt>getgrnam(3)</tt> |
| 545 | and numeric IDs are not supported. |
| 546 | </p> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 547 | <div class="para"><p>Giving these options is an error when used with <tt>--inetd</tt>; use |
| Junio C Hamano | 9adfc6a | 2006-08-28 07:18:38 | [diff] [blame] | 548 | the facility of inet daemon to achieve the same before spawning |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 549 | <em>git-daemon</em> if needed.</p></div> |
| Junio C Hamano | 9adfc6a | 2006-08-28 07:18:38 | [diff] [blame] | 550 | </dd> |
| 551 | <dt> |
| Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 552 | --enable=service |
| 553 | </dt> |
| 554 | <dt> |
| 555 | --disable=service |
| Junio C Hamano | 19ed368 | 2006-09-07 11:44:08 | [diff] [blame] | 556 | </dt> |
| 557 | <dd> |
| 558 | <p> |
| 559 | Enable/disable the service site-wide per default. Note |
| 560 | that a service disabled site-wide can still be enabled |
| 561 | per repository if it is marked overridable and the |
| 562 | repository enables the service with an configuration |
| 563 | item. |
| 564 | </p> |
| 565 | </dd> |
| 566 | <dt> |
| Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 567 | --allow-override=service |
| 568 | </dt> |
| 569 | <dt> |
| 570 | --forbid-override=service |
| Junio C Hamano | 19ed368 | 2006-09-07 11:44:08 | [diff] [blame] | 571 | </dt> |
| 572 | <dd> |
| 573 | <p> |
| 574 | Allow/forbid overriding the site-wide default with per |
| 575 | repository configuration. By default, all the services |
| 576 | are overridable. |
| 577 | </p> |
| 578 | </dd> |
| 579 | <dt> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 580 | <directory> |
| 581 | </dt> |
| 582 | <dd> |
| 583 | <p> |
| 584 | A directory to add to the whitelist of allowed directories. Unless |
| 585 | --strict-paths is specified this will also include subdirectories |
| 586 | of each named directory. |
| 587 | </p> |
| 588 | </dd> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 589 | </dl></div> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 590 | </div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 591 | <h2 id="_services">SERVICES</h2> |
| Junio C Hamano | 19ed368 | 2006-09-07 11:44:08 | [diff] [blame] | 592 | <div class="sectionbody"> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 593 | <div class="para"><p>These services can be globally enabled/disabled using the |
| Junio C Hamano | 21e7f9c | 2007-08-31 07:56:26 | [diff] [blame] | 594 | command line options of this command. If a finer-grained |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 595 | control is desired (e.g. to allow <em>git-archive</em> to be run |
| Junio C Hamano | 21e7f9c | 2007-08-31 07:56:26 | [diff] [blame] | 596 | against only in a few selected repositories the daemon serves), |
| 597 | the per-repository configuration file can be used to enable or |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 598 | disable them.</p></div> |
| 599 | <div class="vlist"><dl> |
| Junio C Hamano | 19ed368 | 2006-09-07 11:44:08 | [diff] [blame] | 600 | <dt> |
| 601 | upload-pack |
| 602 | </dt> |
| 603 | <dd> |
| 604 | <p> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 605 | This serves <em>git-fetch-pack</em> and <em>git-ls-remote</em> |
| Junio C Hamano | 19ed368 | 2006-09-07 11:44:08 | [diff] [blame] | 606 | clients. It is enabled by default, but a repository can |
| 607 | disable it by setting <tt>daemon.uploadpack</tt> configuration |
| 608 | item to <tt>false</tt>. |
| 609 | </p> |
| 610 | </dd> |
| Junio C Hamano | a053d54 | 2006-10-27 09:29:13 | [diff] [blame] | 611 | <dt> |
| 612 | upload-archive |
| 613 | </dt> |
| 614 | <dd> |
| 615 | <p> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 616 | This serves <em>git-archive --remote</em>. It is disabled by |
| Junio C Hamano | 21e7f9c | 2007-08-31 07:56:26 | [diff] [blame] | 617 | default, but a repository can enable it by setting |
| Junio C Hamano | feeb1be | 2008-05-22 00:53:35 | [diff] [blame] | 618 | <tt>daemon.uploadarch</tt> configuration item to <tt>true</tt>. |
| Junio C Hamano | 21e7f9c | 2007-08-31 07:56:26 | [diff] [blame] | 619 | </p> |
| 620 | </dd> |
| 621 | <dt> |
| 622 | receive-pack |
| 623 | </dt> |
| 624 | <dd> |
| 625 | <p> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 626 | This serves <em>git-send-pack</em> clients, allowing anonymous |
| Junio C Hamano | 4604fe5 | 2008-09-19 06:37:10 | [diff] [blame] | 627 | push. It is disabled by default, as there is _no_ |
| Junio C Hamano | 21e7f9c | 2007-08-31 07:56:26 | [diff] [blame] | 628 | authentication in the protocol (in other words, anybody |
| 629 | can push anything into the repository, including removal |
| 630 | of refs). This is solely meant for a closed LAN setting |
| 631 | where everybody is friendly. This service can be |
| 632 | enabled by <tt>daemon.receivepack</tt> configuration item to |
| 633 | <tt>true</tt>. |
| Junio C Hamano | a053d54 | 2006-10-27 09:29:13 | [diff] [blame] | 634 | </p> |
| 635 | </dd> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 636 | </dl></div> |
| Junio C Hamano | 19ed368 | 2006-09-07 11:44:08 | [diff] [blame] | 637 | </div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 638 | <h2 id="_examples">EXAMPLES</h2> |
| Junio C Hamano | 47c1e3c | 2006-09-25 04:45:55 | [diff] [blame] | 639 | <div class="sectionbody"> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 640 | <div class="vlist"><dl> |
| Junio C Hamano | 47c1e3c | 2006-09-25 04:45:55 | [diff] [blame] | 641 | <dt> |
| Junio C Hamano | a053d54 | 2006-10-27 09:29:13 | [diff] [blame] | 642 | We assume the following in /etc/services |
| 643 | </dt> |
| 644 | <dd> |
| 645 | <div class="listingblock"> |
| 646 | <div class="content"> |
| 647 | <pre><tt>$ grep 9418 /etc/services |
| 648 | git 9418/tcp # Git Version Control System</tt></pre> |
| 649 | </div></div> |
| 650 | </dd> |
| 651 | <dt> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 652 | <em>git-daemon</em> as inetd server |
| Junio C Hamano | 47c1e3c | 2006-09-25 04:45:55 | [diff] [blame] | 653 | </dt> |
| 654 | <dd> |
| 655 | <p> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 656 | To set up <em>git-daemon</em> as an inetd service that handles any |
| Junio C Hamano | 47c1e3c | 2006-09-25 04:45:55 | [diff] [blame] | 657 | repository under the whitelisted set of directories, /pub/foo |
| 658 | and /pub/bar, place an entry like the following into |
| 659 | /etc/inetd all on one line: |
| 660 | </p> |
| 661 | <div class="listingblock"> |
| 662 | <div class="content"> |
| Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 663 | <pre><tt> git stream tcp nowait nobody /usr/bin/git |
| 664 | git daemon --inetd --verbose --export-all |
| Junio C Hamano | 47c1e3c | 2006-09-25 04:45:55 | [diff] [blame] | 665 | /pub/foo /pub/bar</tt></pre> |
| 666 | </div></div> |
| 667 | </dd> |
| 668 | <dt> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 669 | <em>git-daemon</em> as inetd server for virtual hosts |
| Junio C Hamano | 47c1e3c | 2006-09-25 04:45:55 | [diff] [blame] | 670 | </dt> |
| 671 | <dd> |
| 672 | <p> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 673 | To set up <em>git-daemon</em> as an inetd service that handles |
| Junio C Hamano | 47c1e3c | 2006-09-25 04:45:55 | [diff] [blame] | 674 | repositories for different virtual hosts, <tt>www.example.com</tt> |
| 675 | and <tt>www.example.org</tt>, place an entry like the following into |
| 676 | <tt>/etc/inetd</tt> all on one line: |
| 677 | </p> |
| 678 | <div class="listingblock"> |
| 679 | <div class="content"> |
| Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 680 | <pre><tt> git stream tcp nowait nobody /usr/bin/git |
| 681 | git daemon --inetd --verbose --export-all |
| Junio C Hamano | 47c1e3c | 2006-09-25 04:45:55 | [diff] [blame] | 682 | --interpolated-path=/pub/%H%D |
| 683 | /pub/www.example.org/software |
| 684 | /pub/www.example.com/software |
| 685 | /software</tt></pre> |
| 686 | </div></div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 687 | <div class="para"><p>In this example, the root-level directory <tt>/pub</tt> will contain |
| Junio C Hamano | 47c1e3c | 2006-09-25 04:45:55 | [diff] [blame] | 688 | a subdirectory for each virtual host name supported. |
| 689 | Further, both hosts advertise repositories simply as |
| 690 | <tt>git://www.example.com/software/repo.git</tt>. For pre-1.4.0 |
| 691 | clients, a symlink from <tt>/software</tt> into the appropriate |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 692 | default repository could be made as well.</p></div> |
| Junio C Hamano | 47c1e3c | 2006-09-25 04:45:55 | [diff] [blame] | 693 | </dd> |
| Junio C Hamano | 032c631 | 2006-09-28 07:39:18 | [diff] [blame] | 694 | <dt> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 695 | <em>git-daemon</em> as regular daemon for virtual hosts |
| Junio C Hamano | 032c631 | 2006-09-28 07:39:18 | [diff] [blame] | 696 | </dt> |
| 697 | <dd> |
| 698 | <p> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 699 | To set up <em>git-daemon</em> as a regular, non-inetd service that |
| Junio C Hamano | 032c631 | 2006-09-28 07:39:18 | [diff] [blame] | 700 | handles repositories for multiple virtual hosts based on |
| 701 | their IP addresses, start the daemon like this: |
| 702 | </p> |
| 703 | <div class="listingblock"> |
| 704 | <div class="content"> |
| Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 705 | <pre><tt> git daemon --verbose --export-all |
| Junio C Hamano | 032c631 | 2006-09-28 07:39:18 | [diff] [blame] | 706 | --interpolated-path=/pub/%IP/%D |
| 707 | /pub/192.168.1.200/software |
| 708 | /pub/10.10.220.23/software</tt></pre> |
| 709 | </div></div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 710 | <div class="para"><p>In this example, the root-level directory <tt>/pub</tt> will contain |
| Junio C Hamano | 032c631 | 2006-09-28 07:39:18 | [diff] [blame] | 711 | a subdirectory for each virtual host IP address supported. |
| 712 | Repositories can still be accessed by hostname though, assuming |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 713 | they correspond to these IP addresses.</p></div> |
| Junio C Hamano | 032c631 | 2006-09-28 07:39:18 | [diff] [blame] | 714 | </dd> |
| Junio C Hamano | dbb6459 | 2007-09-01 11:17:39 | [diff] [blame] | 715 | <dt> |
| 716 | selectively enable/disable services per repository |
| 717 | </dt> |
| 718 | <dd> |
| 719 | <p> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 720 | To enable <em>git-archive --remote</em> and disable <em>git-fetch</em> against |
| Junio C Hamano | dbb6459 | 2007-09-01 11:17:39 | [diff] [blame] | 721 | a repository, have the following in the configuration file in the |
| 722 | repository (that is the file <em>config</em> next to <em>HEAD</em>, <em>refs</em> and |
| 723 | <em>objects</em>). |
| 724 | </p> |
| Junio C Hamano | 21e7f9c | 2007-08-31 07:56:26 | [diff] [blame] | 725 | <div class="listingblock"> |
| 726 | <div class="content"> |
| Junio C Hamano | dbb6459 | 2007-09-01 11:17:39 | [diff] [blame] | 727 | <pre><tt> [daemon] |
| 728 | uploadpack = false |
| Junio C Hamano | feeb1be | 2008-05-22 00:53:35 | [diff] [blame] | 729 | uploadarch = true</tt></pre> |
| Junio C Hamano | 21e7f9c | 2007-08-31 07:56:26 | [diff] [blame] | 730 | </div></div> |
| Junio C Hamano | dbb6459 | 2007-09-01 11:17:39 | [diff] [blame] | 731 | </dd> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 732 | </dl></div> |
| Junio C Hamano | 47c1e3c | 2006-09-25 04:45:55 | [diff] [blame] | 733 | </div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 734 | <h2 id="_author">Author</h2> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 735 | <div class="sectionbody"> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 736 | <div class="para"><p>Written by Linus Torvalds <torvalds@osdl.org>, YOSHIFUJI Hideaki |
| 737 | <yoshfuji@linux-ipv6.org> and the git-list <git@vger.kernel.org></p></div> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 738 | </div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 739 | <h2 id="_documentation">Documentation</h2> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 740 | <div class="sectionbody"> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 741 | <div class="para"><p>Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.</p></div> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 742 | </div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 743 | <h2 id="_git">GIT</h2> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 744 | <div class="sectionbody"> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 745 | <div class="para"><p>Part of the <a href="git.html">git(1)</a> suite</p></div> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 746 | </div> |
| 747 | <div id="footer"> |
| 748 | <div id="footer-text"> |
| Junio C Hamano | 4604fe5 | 2008-09-19 06:37:10 | [diff] [blame] | 749 | Last updated 2008-09-19 06:32:49 UTC |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 750 | </div> |
| 751 | </div> |
| 752 | </body> |
| 753 | </html> |