blob: eeb9ebd51deb0264d82cd6140c4bf22bf7e8b500 [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231<!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>
Junio C Hamano9d971152012-12-19 00:43:115<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
6<meta name="generator" content="AsciiDoc 8.6.8" />
Junio C Hamano68cf15a2010-11-06 01:01:597<title>git-daemon(1)</title>
Junio C Hamano1a4e8412005-12-27 08:17:238<style type="text/css">
Junio C Hamano9d971152012-12-19 00:43:119/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
10
11/* Default font. */
12body {
13 font-family: Georgia,serif;
14}
15
16/* Title font. */
17h1, h2, h3, h4, h5, h6,
18div.title, caption.title,
19thead, p.table.header,
20#toctitle,
21#author, #revnumber, #revdate, #revremark,
22#footer {
23 font-family: Arial,Helvetica,sans-serif;
Junio C Hamano1a4e8412005-12-27 08:17:2324}
25
26body {
27 margin: 1em 5% 1em 5%;
28}
29
Junio C Hamanoba4b9282008-07-06 05:20:3130a {
31 color: blue;
32 text-decoration: underline;
33}
34a:visited {
35 color: fuchsia;
36}
Junio C Hamano1a4e8412005-12-27 08:17:2337
38em {
39 font-style: italic;
Junio C Hamano68cf15a2010-11-06 01:01:5940 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:2341}
42
43strong {
44 font-weight: bold;
Junio C Hamano68cf15a2010-11-06 01:01:5945 color: #083194;
Junio C Hamano1a4e8412005-12-27 08:17:2346}
47
Junio C Hamano1a4e8412005-12-27 08:17:2348h1, h2, h3, h4, h5, h6 {
49 color: #527bbd;
Junio C Hamano1a4e8412005-12-27 08:17:2350 margin-top: 1.2em;
51 margin-bottom: 0.5em;
52 line-height: 1.3;
53}
54
Junio C Hamanoba4b9282008-07-06 05:20:3155h1, h2, h3 {
Junio C Hamano1a4e8412005-12-27 08:17:2356 border-bottom: 2px solid silver;
57}
58h2 {
Junio C Hamano1a4e8412005-12-27 08:17:2359 padding-top: 0.5em;
60}
Junio C Hamanoba4b9282008-07-06 05:20:3161h3 {
62 float: left;
63}
64h3 + * {
65 clear: left;
66}
Junio C Hamano9d971152012-12-19 00:43:1167h5 {
68 font-size: 1.0em;
69}
Junio C Hamano1a4e8412005-12-27 08:17:2370
71div.sectionbody {
Junio C Hamano1a4e8412005-12-27 08:17:2372 margin-left: 0;
73}
74
75hr {
76 border: 1px solid silver;
77}
78
79p {
80 margin-top: 0.5em;
81 margin-bottom: 0.5em;
82}
83
Junio C Hamano68cf15a2010-11-06 01:01:5984ul, ol, li > p {
85 margin-top: 0;
86}
Junio C Hamano9d971152012-12-19 00:43:1187ul > li { color: #aaa; }
88ul > li > * { color: black; }
Junio C Hamano68cf15a2010-11-06 01:01:5989
Junio C Hamano9d971152012-12-19 00:43:1190.monospaced, code, pre {
91 font-family: "Courier New", Courier, monospace;
92 font-size: inherit;
93 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:2394 padding: 0;
95 margin: 0;
96}
97
Junio C Hamano9d971152012-12-19 00:43:1198
99#author {
Junio C Hamano1a4e8412005-12-27 08:17:23100 color: #527bbd;
Junio C Hamano1a4e8412005-12-27 08:17:23101 font-weight: bold;
Junio C Hamanoba4b9282008-07-06 05:20:31102 font-size: 1.1em;
Junio C Hamano1a4e8412005-12-27 08:17:23103}
Junio C Hamano9d971152012-12-19 00:43:11104#email {
Junio C Hamano1a4e8412005-12-27 08:17:23105}
Junio C Hamano9d971152012-12-19 00:43:11106#revnumber, #revdate, #revremark {
Junio C Hamano1a4e8412005-12-27 08:17:23107}
108
Junio C Hamano9d971152012-12-19 00:43:11109#footer {
Junio C Hamano1a4e8412005-12-27 08:17:23110 font-size: small;
111 border-top: 2px solid silver;
112 padding-top: 0.5em;
113 margin-top: 4.0em;
114}
Junio C Hamano9d971152012-12-19 00:43:11115#footer-text {
Junio C Hamano1a4e8412005-12-27 08:17:23116 float: left;
117 padding-bottom: 0.5em;
118}
Junio C Hamano9d971152012-12-19 00:43:11119#footer-badges {
Junio C Hamano1a4e8412005-12-27 08:17:23120 float: right;
121 padding-bottom: 0.5em;
122}
123
Junio C Hamano9d971152012-12-19 00:43:11124#preamble {
Junio C Hamano68cf15a2010-11-06 01:01:59125 margin-top: 1.5em;
126 margin-bottom: 1.5em;
127}
Junio C Hamano9d971152012-12-19 00:43:11128div.imageblock, div.exampleblock, div.verseblock,
Junio C Hamano1a4e8412005-12-27 08:17:23129div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
130div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22131 margin-top: 1.0em;
Junio C Hamano1a4e8412005-12-27 08:17:23132 margin-bottom: 1.5em;
133}
134div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22135 margin-top: 2.0em;
136 margin-bottom: 2.0em;
137 margin-right: 10%;
138 color: #606060;
Junio C Hamano1a4e8412005-12-27 08:17:23139}
140
141div.content { /* Block element content. */
142 padding: 0;
143}
144
145/* Block element titles. */
146div.title, caption.title {
Junio C Hamano68cf15a2010-11-06 01:01:59147 color: #527bbd;
Junio C Hamano1a4e8412005-12-27 08:17:23148 font-weight: bold;
149 text-align: left;
150 margin-top: 1.0em;
151 margin-bottom: 0.5em;
152}
153div.title + * {
154 margin-top: 0;
155}
156
157td div.title:first-child {
158 margin-top: 0.0em;
159}
160div.content div.title:first-child {
161 margin-top: 0.0em;
162}
163div.content + div.title {
164 margin-top: 0.0em;
165}
166
167div.sidebarblock > div.content {
168 background: #ffffee;
Junio C Hamano9d971152012-12-19 00:43:11169 border: 1px solid #dddddd;
170 border-left: 4px solid #f0f0f0;
Junio C Hamano1a4e8412005-12-27 08:17:23171 padding: 0.5em;
172}
173
174div.listingblock > div.content {
Junio C Hamano9d971152012-12-19 00:43:11175 border: 1px solid #dddddd;
176 border-left: 5px solid #f0f0f0;
177 background: #f8f8f8;
Junio C Hamano1a4e8412005-12-27 08:17:23178 padding: 0.5em;
179}
180
Junio C Hamano7bd050f2011-09-22 06:32:22181div.quoteblock, div.verseblock {
182 padding-left: 1.0em;
183 margin-left: 1.0em;
Junio C Hamano68cf15a2010-11-06 01:01:59184 margin-right: 10%;
Junio C Hamano9d971152012-12-19 00:43:11185 border-left: 5px solid #f0f0f0;
186 color: #888;
Junio C Hamano1a4e8412005-12-27 08:17:23187}
Junio C Hamano7bd050f2011-09-22 06:32:22188
Junio C Hamano68cf15a2010-11-06 01:01:59189div.quoteblock > div.attribution {
190 padding-top: 0.5em;
Junio C Hamano1a4e8412005-12-27 08:17:23191 text-align: right;
192}
Junio C Hamano68cf15a2010-11-06 01:01:59193
Junio C Hamano9d971152012-12-19 00:43:11194div.verseblock > pre.content {
195 font-family: inherit;
196 font-size: inherit;
Junio C Hamano68cf15a2010-11-06 01:01:59197}
198div.verseblock > div.attribution {
199 padding-top: 0.75em;
200 text-align: left;
201}
202/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
Junio C Hamanoba4b9282008-07-06 05:20:31203div.verseblock + div.attribution {
204 text-align: left;
205}
Junio C Hamano1a4e8412005-12-27 08:17:23206
207div.admonitionblock .icon {
208 vertical-align: top;
209 font-size: 1.1em;
210 font-weight: bold;
211 text-decoration: underline;
212 color: #527bbd;
213 padding-right: 0.5em;
214}
215div.admonitionblock td.content {
216 padding-left: 0.5em;
Junio C Hamano7bd050f2011-09-22 06:32:22217 border-left: 3px solid #dddddd;
Junio C Hamano1a4e8412005-12-27 08:17:23218}
219
220div.exampleblock > div.content {
Junio C Hamano7bd050f2011-09-22 06:32:22221 border-left: 3px solid #dddddd;
222 padding-left: 0.5em;
Junio C Hamano1a4e8412005-12-27 08:17:23223}
224
Junio C Hamano1a4e8412005-12-27 08:17:23225div.imageblock div.content { padding-left: 0; }
Junio C Hamano1a4e8412005-12-27 08:17:23226span.image img { border-style: none; }
Junio C Hamano68cf15a2010-11-06 01:01:59227a.image:visited { color: white; }
Junio C Hamano1a4e8412005-12-27 08:17:23228
229dl {
230 margin-top: 0.8em;
231 margin-bottom: 0.8em;
232}
233dt {
234 margin-top: 0.5em;
235 margin-bottom: 0;
Junio C Hamano68cf15a2010-11-06 01:01:59236 font-style: normal;
237 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:23238}
239dd > *:first-child {
Junio C Hamano68cf15a2010-11-06 01:01:59240 margin-top: 0.1em;
Junio C Hamano1a4e8412005-12-27 08:17:23241}
242
243ul, ol {
244 list-style-position: outside;
245}
Junio C Hamano68cf15a2010-11-06 01:01:59246ol.arabic {
247 list-style-type: decimal;
248}
249ol.loweralpha {
Junio C Hamano1a4e8412005-12-27 08:17:23250 list-style-type: lower-alpha;
251}
Junio C Hamano68cf15a2010-11-06 01:01:59252ol.upperalpha {
253 list-style-type: upper-alpha;
254}
255ol.lowerroman {
256 list-style-type: lower-roman;
257}
258ol.upperroman {
259 list-style-type: upper-roman;
260}
261
262div.compact ul, div.compact ol,
263div.compact p, div.compact p,
264div.compact div, div.compact div {
265 margin-top: 0.1em;
266 margin-bottom: 0.1em;
267}
Junio C Hamano1a4e8412005-12-27 08:17:23268
Junio C Hamano1a4e8412005-12-27 08:17:23269tfoot {
270 font-weight: bold;
271}
Junio C Hamano68cf15a2010-11-06 01:01:59272td > div.verse {
273 white-space: pre;
274}
Junio C Hamano68cf15a2010-11-06 01:01:59275
276div.hdlist {
Junio C Hamano1a4e8412005-12-27 08:17:23277 margin-top: 0.8em;
278 margin-bottom: 0.8em;
279}
Junio C Hamano68cf15a2010-11-06 01:01:59280div.hdlist tr {
281 padding-bottom: 15px;
Junio C Hamanoba4b9282008-07-06 05:20:31282}
Junio C Hamano68cf15a2010-11-06 01:01:59283dt.hdlist1.strong, td.hdlist1.strong {
284 font-weight: bold;
285}
286td.hdlist1 {
Junio C Hamano1a4e8412005-12-27 08:17:23287 vertical-align: top;
Junio C Hamano68cf15a2010-11-06 01:01:59288 font-style: normal;
Junio C Hamano1a4e8412005-12-27 08:17:23289 padding-right: 0.8em;
Junio C Hamano68cf15a2010-11-06 01:01:59290 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:23291}
Junio C Hamano68cf15a2010-11-06 01:01:59292td.hdlist2 {
Junio C Hamano1a4e8412005-12-27 08:17:23293 vertical-align: top;
294}
Junio C Hamano68cf15a2010-11-06 01:01:59295div.hdlist.compact tr {
296 margin: 0;
297 padding-bottom: 0;
298}
299
300.comment {
301 background: yellow;
302}
Junio C Hamano1a4e8412005-12-27 08:17:23303
Junio C Hamano7bd050f2011-09-22 06:32:22304.footnote, .footnoteref {
305 font-size: 0.8em;
306}
307
308span.footnote, span.footnoteref {
309 vertical-align: super;
310}
311
312#footnotes {
313 margin: 20px 0 20px 0;
314 padding: 7px 0 0 0;
315}
316
317#footnotes div.footnote {
318 margin: 0 0 5px 0;
319}
320
321#footnotes hr {
322 border: none;
323 border-top: 1px solid silver;
324 height: 1px;
325 text-align: left;
326 margin-left: 0;
327 width: 20%;
328 min-width: 100px;
329}
330
Junio C Hamano9d971152012-12-19 00:43:11331div.colist td {
332 padding-right: 0.5em;
333 padding-bottom: 0.3em;
334 vertical-align: top;
335}
336div.colist td img {
337 margin-top: 0.3em;
Junio C Hamano1a4e8412005-12-27 08:17:23338}
Junio C Hamanoba4b9282008-07-06 05:20:31339
Junio C Hamano9d971152012-12-19 00:43:11340@media print {
341 #footer-badges { display: none; }
342}
343
344#toc {
Junio C Hamano7bd050f2011-09-22 06:32:22345 margin-bottom: 2.5em;
346}
347
Junio C Hamano9d971152012-12-19 00:43:11348#toctitle {
Junio C Hamanoba4b9282008-07-06 05:20:31349 color: #527bbd;
Junio C Hamanoba4b9282008-07-06 05:20:31350 font-size: 1.1em;
351 font-weight: bold;
352 margin-top: 1.0em;
353 margin-bottom: 0.1em;
354}
355
Junio C Hamano9d971152012-12-19 00:43:11356div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
Junio C Hamanoba4b9282008-07-06 05:20:31357 margin-top: 0;
358 margin-bottom: 0;
359}
360div.toclevel2 {
361 margin-left: 2em;
362 font-size: 0.9em;
363}
364div.toclevel3 {
365 margin-left: 4em;
366 font-size: 0.9em;
367}
368div.toclevel4 {
369 margin-left: 6em;
370 font-size: 0.9em;
371}
Junio C Hamano9d971152012-12-19 00:43:11372
373span.aqua { color: aqua; }
374span.black { color: black; }
375span.blue { color: blue; }
376span.fuchsia { color: fuchsia; }
377span.gray { color: gray; }
378span.green { color: green; }
379span.lime { color: lime; }
380span.maroon { color: maroon; }
381span.navy { color: navy; }
382span.olive { color: olive; }
383span.purple { color: purple; }
384span.red { color: red; }
385span.silver { color: silver; }
386span.teal { color: teal; }
387span.white { color: white; }
388span.yellow { color: yellow; }
389
390span.aqua-background { background: aqua; }
391span.black-background { background: black; }
392span.blue-background { background: blue; }
393span.fuchsia-background { background: fuchsia; }
394span.gray-background { background: gray; }
395span.green-background { background: green; }
396span.lime-background { background: lime; }
397span.maroon-background { background: maroon; }
398span.navy-background { background: navy; }
399span.olive-background { background: olive; }
400span.purple-background { background: purple; }
401span.red-background { background: red; }
402span.silver-background { background: silver; }
403span.teal-background { background: teal; }
404span.white-background { background: white; }
405span.yellow-background { background: yellow; }
406
407span.big { font-size: 2em; }
408span.small { font-size: 0.6em; }
409
410span.underline { text-decoration: underline; }
411span.overline { text-decoration: overline; }
412span.line-through { text-decoration: line-through; }
413
414div.unbreakable { page-break-inside: avoid; }
415
416
417/*
418 * xhtml11 specific
419 *
420 * */
421
422div.tableblock {
423 margin-top: 1.0em;
424 margin-bottom: 1.5em;
425}
426div.tableblock > table {
427 border: 3px solid #527bbd;
428}
429thead, p.table.header {
430 font-weight: bold;
431 color: #527bbd;
432}
433p.table {
434 margin-top: 0;
435}
436/* Because the table frame attribute is overriden by CSS in most browsers. */
437div.tableblock > table[frame="void"] {
438 border-style: none;
439}
440div.tableblock > table[frame="hsides"] {
441 border-left-style: none;
442 border-right-style: none;
443}
444div.tableblock > table[frame="vsides"] {
445 border-top-style: none;
446 border-bottom-style: none;
447}
448
449
450/*
451 * html5 specific
452 *
453 * */
454
455table.tableblock {
456 margin-top: 1.0em;
457 margin-bottom: 1.5em;
458}
459thead, p.tableblock.header {
460 font-weight: bold;
461 color: #527bbd;
462}
463p.tableblock {
464 margin-top: 0;
465}
466table.tableblock {
467 border-width: 3px;
468 border-spacing: 0px;
469 border-style: solid;
470 border-color: #527bbd;
471 border-collapse: collapse;
472}
473th.tableblock, td.tableblock {
474 border-width: 1px;
475 padding: 4px;
476 border-style: solid;
477 border-color: #527bbd;
478}
479
480table.tableblock.frame-topbot {
481 border-left-style: hidden;
482 border-right-style: hidden;
483}
484table.tableblock.frame-sides {
485 border-top-style: hidden;
486 border-bottom-style: hidden;
487}
488table.tableblock.frame-none {
489 border-style: hidden;
490}
491
492th.tableblock.halign-left, td.tableblock.halign-left {
493 text-align: left;
494}
495th.tableblock.halign-center, td.tableblock.halign-center {
496 text-align: center;
497}
498th.tableblock.halign-right, td.tableblock.halign-right {
499 text-align: right;
500}
501
502th.tableblock.valign-top, td.tableblock.valign-top {
503 vertical-align: top;
504}
505th.tableblock.valign-middle, td.tableblock.valign-middle {
506 vertical-align: middle;
507}
508th.tableblock.valign-bottom, td.tableblock.valign-bottom {
509 vertical-align: bottom;
510}
511
512
513/*
514 * manpage specific
515 *
516 * */
517
518body.manpage h1 {
Junio C Hamano68cf15a2010-11-06 01:01:59519 padding-top: 0.5em;
520 padding-bottom: 0.5em;
521 border-top: 2px solid silver;
522 border-bottom: 2px solid silver;
523}
Junio C Hamano9d971152012-12-19 00:43:11524body.manpage h2 {
Junio C Hamano68cf15a2010-11-06 01:01:59525 border-style: none;
526}
Junio C Hamano9d971152012-12-19 00:43:11527body.manpage div.sectionbody {
528 margin-left: 3em;
Junio C Hamano68cf15a2010-11-06 01:01:59529}
530
531@media print {
Junio C Hamano9d971152012-12-19 00:43:11532 body.manpage div#toc { display: none; }
Junio C Hamano68cf15a2010-11-06 01:01:59533}
534
Junio C Hamano1a4e8412005-12-27 08:17:23535
Junio C Hamano1a4e8412005-12-27 08:17:23536</style>
Junio C Hamano7bd050f2011-09-22 06:32:22537<script type="text/javascript">
538/*<![CDATA[*/
Junio C Hamano7bd050f2011-09-22 06:32:22539var asciidoc = { // Namespace.
540
541/////////////////////////////////////////////////////////////////////
542// Table Of Contents generator
543/////////////////////////////////////////////////////////////////////
544
545/* Author: Mihai Bazon, September 2002
546 * http://students.infoiasi.ro/~mishoo
547 *
548 * Table Of Content generator
549 * Version: 0.4
550 *
551 * Feel free to use this script under the terms of the GNU General Public
552 * License, as long as you do not remove or alter this notice.
553 */
554
555 /* modified by Troy D. Hanson, September 2006. License: GPL */
556 /* modified by Stuart Rackham, 2006, 2009. License: GPL */
557
558// toclevels = 1..4.
559toc: function (toclevels) {
560
561 function getText(el) {
562 var text = "";
563 for (var i = el.firstChild; i != null; i = i.nextSibling) {
564 if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
565 text += i.data;
566 else if (i.firstChild != null)
567 text += getText(i);
568 }
569 return text;
570 }
571
572 function TocEntry(el, text, toclevel) {
573 this.element = el;
574 this.text = text;
575 this.toclevel = toclevel;
576 }
577
578 function tocEntries(el, toclevels) {
579 var result = new Array;
Junio C Hamano9d971152012-12-19 00:43:11580 var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
Junio C Hamano7bd050f2011-09-22 06:32:22581 // Function that scans the DOM tree for header elements (the DOM2
582 // nodeIterator API would be a better technique but not supported by all
583 // browsers).
584 var iterate = function (el) {
585 for (var i = el.firstChild; i != null; i = i.nextSibling) {
586 if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
587 var mo = re.exec(i.tagName);
588 if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
589 result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
590 }
591 iterate(i);
592 }
593 }
594 }
595 iterate(el);
596 return result;
597 }
598
599 var toc = document.getElementById("toc");
Junio C Hamano9d971152012-12-19 00:43:11600 if (!toc) {
601 return;
602 }
603
604 // Delete existing TOC entries in case we're reloading the TOC.
605 var tocEntriesToRemove = [];
606 var i;
607 for (i = 0; i < toc.childNodes.length; i++) {
608 var entry = toc.childNodes[i];
609 if (entry.nodeName.toLowerCase() == 'div'
610 && entry.getAttribute("class")
611 && entry.getAttribute("class").match(/^toclevel/))
612 tocEntriesToRemove.push(entry);
613 }
614 for (i = 0; i < tocEntriesToRemove.length; i++) {
615 toc.removeChild(tocEntriesToRemove[i]);
616 }
617
618 // Rebuild TOC entries.
Junio C Hamano7bd050f2011-09-22 06:32:22619 var entries = tocEntries(document.getElementById("content"), toclevels);
620 for (var i = 0; i < entries.length; ++i) {
621 var entry = entries[i];
622 if (entry.element.id == "")
623 entry.element.id = "_toc_" + i;
624 var a = document.createElement("a");
625 a.href = "#" + entry.element.id;
626 a.appendChild(document.createTextNode(entry.text));
627 var div = document.createElement("div");
628 div.appendChild(a);
629 div.className = "toclevel" + entry.toclevel;
630 toc.appendChild(div);
631 }
632 if (entries.length == 0)
633 toc.parentNode.removeChild(toc);
634},
635
636
637/////////////////////////////////////////////////////////////////////
638// Footnotes generator
639/////////////////////////////////////////////////////////////////////
640
641/* Based on footnote generation code from:
642 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
643 */
644
645footnotes: function () {
Junio C Hamano9d971152012-12-19 00:43:11646 // Delete existing footnote entries in case we're reloading the footnodes.
647 var i;
Junio C Hamano7bd050f2011-09-22 06:32:22648 var noteholder = document.getElementById("footnotes");
Junio C Hamano9d971152012-12-19 00:43:11649 if (!noteholder) {
650 return;
651 }
652 var entriesToRemove = [];
653 for (i = 0; i < noteholder.childNodes.length; i++) {
654 var entry = noteholder.childNodes[i];
655 if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
656 entriesToRemove.push(entry);
657 }
658 for (i = 0; i < entriesToRemove.length; i++) {
659 noteholder.removeChild(entriesToRemove[i]);
660 }
661
662 // Rebuild footnote entries.
663 var cont = document.getElementById("content");
Junio C Hamano7bd050f2011-09-22 06:32:22664 var spans = cont.getElementsByTagName("span");
665 var refs = {};
666 var n = 0;
667 for (i=0; i<spans.length; i++) {
668 if (spans[i].className == "footnote") {
669 n++;
Junio C Hamano9d971152012-12-19 00:43:11670 var note = spans[i].getAttribute("data-note");
671 if (!note) {
672 // Use [\s\S] in place of . so multi-line matches work.
673 // Because JavaScript has no s (dotall) regex flag.
674 note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
675 spans[i].innerHTML =
676 "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
677 "' title='View footnote' class='footnote'>" + n + "</a>]";
678 spans[i].setAttribute("data-note", note);
679 }
Junio C Hamano7bd050f2011-09-22 06:32:22680 noteholder.innerHTML +=
681 "<div class='footnote' id='_footnote_" + n + "'>" +
682 "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
683 n + "</a>. " + note + "</div>";
Junio C Hamano7bd050f2011-09-22 06:32:22684 var id =spans[i].getAttribute("id");
685 if (id != null) refs["#"+id] = n;
686 }
687 }
688 if (n == 0)
689 noteholder.parentNode.removeChild(noteholder);
690 else {
691 // Process footnoterefs.
692 for (i=0; i<spans.length; i++) {
693 if (spans[i].className == "footnoteref") {
694 var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
695 href = href.match(/#.*/)[0]; // Because IE return full URL.
696 n = refs[href];
697 spans[i].innerHTML =
698 "[<a href='#_footnote_" + n +
699 "' title='View footnote' class='footnote'>" + n + "</a>]";
700 }
701 }
702 }
Junio C Hamano9d971152012-12-19 00:43:11703},
704
705install: function(toclevels) {
706 var timerId;
707
708 function reinstall() {
709 asciidoc.footnotes();
710 if (toclevels) {
711 asciidoc.toc(toclevels);
712 }
713 }
714
715 function reinstallAndRemoveTimer() {
716 clearInterval(timerId);
717 reinstall();
718 }
719
720 timerId = setInterval(reinstall, 500);
721 if (document.addEventListener)
722 document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
723 else
724 window.onload = reinstallAndRemoveTimer;
Junio C Hamano7bd050f2011-09-22 06:32:22725}
726
727}
Junio C Hamano9d971152012-12-19 00:43:11728asciidoc.install();
Junio C Hamano7bd050f2011-09-22 06:32:22729/*]]>*/
730</script>
Junio C Hamano1a4e8412005-12-27 08:17:23731</head>
Junio C Hamano9d971152012-12-19 00:43:11732<body class="manpage">
Junio C Hamano1a4e8412005-12-27 08:17:23733<div id="header">
734<h1>
735git-daemon(1) Manual Page
736</h1>
737<h2>NAME</h2>
738<div class="sectionbody">
739<p>git-daemon -
Junio C Hamano076ffcc2013-02-06 05:13:21740 A really simple server for Git repositories
Junio C Hamano1a4e8412005-12-27 08:17:23741</p>
742</div>
743</div>
Junio C Hamano7bd050f2011-09-22 06:32:22744<div id="content">
Junio C Hamano9d971152012-12-19 00:43:11745<div class="sect1">
Junio C Hamano68cf15a2010-11-06 01:01:59746<h2 id="_synopsis">SYNOPSIS</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23747<div class="sectionbody">
Junio C Hamano235a91e2006-01-07 01:13:58748<div class="verseblock">
Junio C Hamano9d971152012-12-19 00:43:11749<pre class="content"><em>git daemon</em> [--verbose] [--syslog] [--export-all]
Junio C Hamanod2179ef2010-10-22 04:12:17750 [--timeout=&lt;n&gt;] [--init-timeout=&lt;n&gt;] [--max-connections=&lt;n&gt;]
751 [--strict-paths] [--base-path=&lt;path&gt;] [--base-path-relaxed]
752 [--user-path | --user-path=&lt;path&gt;]
753 [--interpolated-path=&lt;pathtemplate&gt;]
754 [--reuseaddr] [--detach] [--pid-file=&lt;file&gt;]
755 [--enable=&lt;service&gt;] [--disable=&lt;service&gt;]
756 [--allow-override=&lt;service&gt;] [--forbid-override=&lt;service&gt;]
Junio C Hamano3d1b5a12013-05-17 23:34:02757 [--access-hook=&lt;path&gt;] [--[no-]informative-errors]
758 [--inetd |
759 [--listen=&lt;host_or_ipaddr&gt;] [--port=&lt;n&gt;]
760 [--user=&lt;user&gt; [--group=&lt;group&gt;]]]
Junio C Hamano9d971152012-12-19 00:43:11761 [&lt;directory&gt;&#8230;]</pre>
762<div class="attribution">
Junio C Hamano68cf15a2010-11-06 01:01:59763</div></div>
Junio C Hamano1a4e8412005-12-27 08:17:23764</div>
Junio C Hamano9d971152012-12-19 00:43:11765</div>
766<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31767<h2 id="_description">DESCRIPTION</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23768<div class="sectionbody">
Junio C Hamano076ffcc2013-02-06 05:13:21769<div class="paragraph"><p>A really simple TCP Git daemon that normally listens on port "DEFAULT_GIT_PORT"
Junio C Hamano19ed3682006-09-07 11:44:08770aka 9418. It waits for a connection asking for a service, and will serve
Junio C Hamanoba4b9282008-07-06 05:20:31771that service if it is enabled.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59772<div class="paragraph"><p>It verifies that the directory has the magic file "git-daemon-export-ok", and
Junio C Hamano076ffcc2013-02-06 05:13:21773it will refuse to export any Git directory that hasn&#8217;t explicitly been marked
Junio C Hamano1a4e8412005-12-27 08:17:23774for export this way (unless the <em>--export-all</em> parameter is specified). If you
Junio C Hamano1aa40d22010-01-21 17:46:43775pass some directory paths as <em>git daemon</em> arguments, you can further restrict
Junio C Hamanoba4b9282008-07-06 05:20:31776the offers to a whitelist comprising of those.</p></div>
Junio C Hamano9d971152012-12-19 00:43:11777<div class="paragraph"><p>By default, only <code>upload-pack</code> service is enabled, which serves
Junio C Hamano1aa40d22010-01-21 17:46:43778<em>git fetch-pack</em> and <em>git ls-remote</em> clients, which are invoked
779from <em>git fetch</em>, <em>git pull</em>, and <em>git clone</em>.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59780<div class="paragraph"><p>This is ideally suited for read-only updates, i.e., pulling from
Junio C Hamano076ffcc2013-02-06 05:13:21781Git repositories.</p></div>
Junio C Hamano9d971152012-12-19 00:43:11782<div class="paragraph"><p>An <code>upload-archive</code> also exists to serve <em>git archive</em>.</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:23783</div>
Junio C Hamano9d971152012-12-19 00:43:11784</div>
785<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31786<h2 id="_options">OPTIONS</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23787<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:59788<div class="dlist"><dl>
789<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:23790--strict-paths
791</dt>
792<dd>
793<p>
Junio C Hamano68cf15a2010-11-06 01:01:59794 Match paths exactly (i.e. don&#8217;t allow "/foo/repo" when the real path is
795 "/foo/repo.git" or "/foo/repo/.git") and don&#8217;t do user-relative paths.
Junio C Hamano1aa40d22010-01-21 17:46:43796 <em>git daemon</em> will refuse to start when this option is enabled and no
Junio C Hamano1a4e8412005-12-27 08:17:23797 whitelist is specified.
798</p>
799</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59800<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:17801--base-path=&lt;path&gt;
Junio C Hamano4d04a402006-01-09 00:53:28802</dt>
803<dd>
804<p>
805 Remap all the path requests as relative to the given path.
Junio C Hamano076ffcc2013-02-06 05:13:21806 This is sort of "Git root" - if you run <em>git daemon</em> with
Junio C Hamano4d04a402006-01-09 00:53:28807 <em>--base-path=/srv/git</em> on example.com, then if you later try to pull
Junio C Hamano1aa40d22010-01-21 17:46:43808 <em>git://example.com/hello.git</em>, <em>git daemon</em> will interpret the path
Junio C Hamano70fafca2006-02-06 08:02:01809 as <em>/srv/git/hello.git</em>.
Junio C Hamano4d04a402006-01-09 00:53:28810</p>
811</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59812<dt class="hdlist1">
Junio C Hamano0ddc94d2007-08-01 08:42:39813--base-path-relaxed
814</dt>
815<dd>
816<p>
817 If --base-path is enabled and repo lookup fails, with this option
Junio C Hamano1aa40d22010-01-21 17:46:43818 <em>git daemon</em> will attempt to lookup without prefixing the base path.
Junio C Hamano0ddc94d2007-08-01 08:42:39819 This is useful for switching to --base-path usage, while still
820 allowing the old paths.
821</p>
822</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59823<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:17824--interpolated-path=&lt;pathtemplate&gt;
Junio C Hamano47c1e3c2006-09-25 04:45:55825</dt>
826<dd>
827<p>
828 To support virtual hosting, an interpolated path template can be
829 used to dynamically construct alternate paths. The template
Junio C Hamano032c6312006-09-28 07:39:18830 supports %H for the target hostname as supplied by the client but
831 converted to all lowercase, %CH for the canonical hostname,
Junio C Hamano68cf15a2010-11-06 01:01:59832 %IP for the server&#8217;s IP address, %P for the port number,
Junio C Hamano47c1e3c2006-09-25 04:45:55833 and %D for the absolute path of the named repository.
Junio C Hamano032c6312006-09-28 07:39:18834 After interpolation, the path is validated against the directory
835 whitelist.
Junio C Hamano47c1e3c2006-09-25 04:45:55836</p>
837</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59838<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:23839--export-all
840</dt>
841<dd>
842<p>
Junio C Hamano076ffcc2013-02-06 05:13:21843 Allow pulling from all directories that look like Git repositories
Junio C Hamano1a4e8412005-12-27 08:17:23844 (have the <em>objects</em> and <em>refs</em> subdirectories), even if they
845 do not have the <em>git-daemon-export-ok</em> file.
846</p>
847</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59848<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:23849--inetd
850</dt>
851<dd>
852<p>
853 Have the server run as an inetd service. Implies --syslog.
Junio C Hamano97bcb482010-11-25 03:16:07854 Incompatible with --detach, --port, --listen, --user and --group
855 options.
Junio C Hamano1a4e8412005-12-27 08:17:23856</p>
857</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59858<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:17859--listen=&lt;host_or_ipaddr&gt;
Junio C Hamano1a4e8412005-12-27 08:17:23860</dt>
861<dd>
862<p>
Junio C Hamano4cfa5362009-04-18 23:01:01863 Listen on a specific IP address or hostname. IP addresses can
864 be either an IPv4 address or an IPv6 address if supported. If IPv6
Junio C Hamano032c6312006-09-28 07:39:18865 is not supported, then --listen=hostname is also not supported and
866 --listen must be given an IPv4 address.
Junio C Hamano39c7a692010-10-27 06:08:54867 Can be given more than once.
Junio C Hamano032c6312006-09-28 07:39:18868 Incompatible with <em>--inetd</em> option.
869</p>
870</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59871<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:17872--port=&lt;n&gt;
Junio C Hamano032c6312006-09-28 07:39:18873</dt>
874<dd>
875<p>
876 Listen on an alternative port. Incompatible with <em>--inetd</em> option.
Junio C Hamano1a4e8412005-12-27 08:17:23877</p>
878</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59879<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:17880--init-timeout=&lt;n&gt;
Junio C Hamano1a4e8412005-12-27 08:17:23881</dt>
882<dd>
883<p>
Junio C Hamano7bd050f2011-09-22 06:32:22884 Timeout (in seconds) between the moment the connection is established
885 and the client request is received (typically a rather low value, since
Junio C Hamano1a4e8412005-12-27 08:17:23886 that should be basically immediate).
887</p>
888</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59889<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:17890--timeout=&lt;n&gt;
Junio C Hamano1a4e8412005-12-27 08:17:23891</dt>
892<dd>
893<p>
Junio C Hamano7bd050f2011-09-22 06:32:22894 Timeout (in seconds) for specific client sub-requests. This includes
895 the time it takes for the server to process the sub-request and the
896 time spent waiting for the next client&#8217;s request.
Junio C Hamano1a4e8412005-12-27 08:17:23897</p>
898</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59899<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:17900--max-connections=&lt;n&gt;
Junio C Hamanofcb740a2008-08-31 06:32:05901</dt>
902<dd>
903<p>
904 Maximum number of concurrent clients, defaults to 32. Set it to
905 zero for no limit.
906</p>
907</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59908<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:23909--syslog
910</dt>
911<dd>
912<p>
913 Log to syslog instead of stderr. Note that this option does not imply
914 --verbose, thus by default only error conditions will be logged.
915</p>
916</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59917<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47918--user-path
919</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59920<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:17921--user-path=&lt;path&gt;
Junio C Hamano70fafca2006-02-06 08:02:01922</dt>
923<dd>
924<p>
Junio C Hamano116db352008-12-17 19:48:40925 Allow &#126;user notation to be used in requests. When
Junio C Hamano70fafca2006-02-06 08:02:01926 specified with no parameter, requests to
Junio C Hamano116db352008-12-17 19:48:40927 git://host/&#126;alice/foo is taken as a request to access
Junio C Hamano9d971152012-12-19 00:43:11928 <em>foo</em> repository in the home directory of user <code>alice</code>.
929 If <code>--user-path=path</code> is specified, the same request is
930 taken as a request to access <code>path/foo</code> repository in
931 the home directory of user <code>alice</code>.
Junio C Hamano70fafca2006-02-06 08:02:01932</p>
933</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59934<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:23935--verbose
936</dt>
937<dd>
938<p>
939 Log details about the incoming connections and requested files.
940</p>
941</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59942<dt class="hdlist1">
Junio C Hamanoabb53dc2006-07-28 05:14:12943--reuseaddr
944</dt>
945<dd>
946<p>
947 Use SO_REUSEADDR when binding the listening socket.
948 This allows the server to restart without waiting for
949 old connections to time out.
950</p>
951</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59952<dt class="hdlist1">
Junio C Hamanoabb53dc2006-07-28 05:14:12953--detach
954</dt>
955<dd>
956<p>
957 Detach from the shell. Implies --syslog.
958</p>
959</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59960<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:17961--pid-file=&lt;file&gt;
Junio C Hamanoabb53dc2006-07-28 05:14:12962</dt>
963<dd>
964<p>
Junio C Hamano21e7f9c2007-08-31 07:56:26965 Save the process id in <em>file</em>. Ignored when the daemon
Junio C Hamano9d971152012-12-19 00:43:11966 is run under <code>--inetd</code>.
Junio C Hamanoabb53dc2006-07-28 05:14:12967</p>
968</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59969<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:17970--user=&lt;user&gt;
Junio C Hamanoeb415992008-06-08 22:49:47971</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59972<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:17973--group=&lt;group&gt;
Junio C Hamano9adfc6a2006-08-28 07:18:38974</dt>
975<dd>
976<p>
Junio C Hamano68cf15a2010-11-06 01:01:59977 Change daemon&#8217;s uid and gid before entering the service loop.
Junio C Hamano9d971152012-12-19 00:43:11978 When only <code>--user</code> is given without <code>--group</code>, the
Junio C Hamano9adfc6a2006-08-28 07:18:38979 primary group ID for the user is used. The values of
Junio C Hamano9d971152012-12-19 00:43:11980 the option are given to <code>getpwnam(3)</code> and <code>getgrnam(3)</code>
Junio C Hamano9adfc6a2006-08-28 07:18:38981 and numeric IDs are not supported.
982</p>
Junio C Hamano9d971152012-12-19 00:43:11983<div class="paragraph"><p>Giving these options is an error when used with <code>--inetd</code>; use
Junio C Hamano9adfc6a2006-08-28 07:18:38984the facility of inet daemon to achieve the same before spawning
Junio C Hamano1aa40d22010-01-21 17:46:43985<em>git daemon</em> if needed.</p></div>
Junio C Hamanoea3b7522013-04-18 19:37:53986<div class="paragraph"><p>Like many programs that switch user id, the daemon does not reset
987environment variables such as <code>$HOME</code> when it runs git programs,
988e.g. <code>upload-pack</code> and <code>receive-pack</code>. When using this option, you
989may also want to set and export <code>HOME</code> to point at the home
990directory of <code>&lt;user&gt;</code> before starting the daemon, and make sure any
991Git configuration files in that directory are readable by <code>&lt;user&gt;</code>.</p></div>
Junio C Hamano9adfc6a2006-08-28 07:18:38992</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59993<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:17994--enable=&lt;service&gt;
Junio C Hamanoeb415992008-06-08 22:49:47995</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59996<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:17997--disable=&lt;service&gt;
Junio C Hamano19ed3682006-09-07 11:44:08998</dt>
999<dd>
1000<p>
1001 Enable/disable the service site-wide per default. Note
1002 that a service disabled site-wide can still be enabled
1003 per repository if it is marked overridable and the
Junio C Hamano4cfa5362009-04-18 23:01:011004 repository enables the service with a configuration
Junio C Hamano19ed3682006-09-07 11:44:081005 item.
1006</p>
1007</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591008<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:171009--allow-override=&lt;service&gt;
Junio C Hamanoeb415992008-06-08 22:49:471010</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591011<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:171012--forbid-override=&lt;service&gt;
Junio C Hamano19ed3682006-09-07 11:44:081013</dt>
1014<dd>
1015<p>
1016 Allow/forbid overriding the site-wide default with per
1017 repository configuration. By default, all the services
1018 are overridable.
1019</p>
1020</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591021<dt class="hdlist1">
Junio C Hamano3d1b5a12013-05-17 23:34:021022--[no-]informative-errors
Junio C Hamano6231f822011-10-24 05:18:521023</dt>
1024<dd>
1025<p>
1026 When informative errors are turned on, git-daemon will report
1027 more verbose errors to the client, differentiating conditions
1028 like "no such repository" from "repository not exported". This
1029 is more convenient for clients, but may leak information about
1030 the existence of unexported repositories. When informative
1031 errors are not enabled, all errors report "access denied" to the
1032 client. The default is --no-informative-errors.
1033</p>
1034</dd>
1035<dt class="hdlist1">
Junio C Hamanof3353932012-09-04 23:16:511036--access-hook=&lt;path&gt;
1037</dt>
1038<dd>
1039<p>
1040 Every time a client connects, first run an external command
1041 specified by the &lt;path&gt; with service name (e.g. "upload-pack"),
1042 path to the repository, hostname (%H), canonical hostname
1043 (%CH), ip address (%IP), and tcp port (%P) as its command line
1044 arguments. The external command can decide to decline the
1045 service by exiting with a non-zero status (or to allow it by
1046 exiting with a zero status). It can also look at the $REMOTE_ADDR
1047 and $REMOTE_PORT environment variables to learn about the
1048 requestor when making this decision.
1049</p>
1050<div class="paragraph"><p>The external command can optionally write a single line to its
1051standard output to be sent to the requestor as an error message when
1052it declines the service.</p></div>
1053</dd>
1054<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:231055&lt;directory&gt;
1056</dt>
1057<dd>
1058<p>
1059 A directory to add to the whitelist of allowed directories. Unless
1060 --strict-paths is specified this will also include subdirectories
1061 of each named directory.
1062</p>
1063</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311064</dl></div>
Junio C Hamano1a4e8412005-12-27 08:17:231065</div>
Junio C Hamano9d971152012-12-19 00:43:111066</div>
1067<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311068<h2 id="_services">SERVICES</h2>
Junio C Hamano19ed3682006-09-07 11:44:081069<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591070<div class="paragraph"><p>These services can be globally enabled/disabled using the
Junio C Hamano21e7f9c2007-08-31 07:56:261071command line options of this command. If a finer-grained
Junio C Hamano1aa40d22010-01-21 17:46:431072control is desired (e.g. to allow <em>git archive</em> to be run
Junio C Hamano21e7f9c2007-08-31 07:56:261073against only in a few selected repositories the daemon serves),
1074the per-repository configuration file can be used to enable or
Junio C Hamanoba4b9282008-07-06 05:20:311075disable them.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591076<div class="dlist"><dl>
1077<dt class="hdlist1">
Junio C Hamano19ed3682006-09-07 11:44:081078upload-pack
1079</dt>
1080<dd>
1081<p>
Junio C Hamano1aa40d22010-01-21 17:46:431082 This serves <em>git fetch-pack</em> and <em>git ls-remote</em>
Junio C Hamano19ed3682006-09-07 11:44:081083 clients. It is enabled by default, but a repository can
Junio C Hamano9d971152012-12-19 00:43:111084 disable it by setting <code>daemon.uploadpack</code> configuration
1085 item to <code>false</code>.
Junio C Hamano19ed3682006-09-07 11:44:081086</p>
1087</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591088<dt class="hdlist1">
Junio C Hamanoa053d542006-10-27 09:29:131089upload-archive
1090</dt>
1091<dd>
1092<p>
Junio C Hamano1aa40d22010-01-21 17:46:431093 This serves <em>git archive --remote</em>. It is disabled by
Junio C Hamano21e7f9c2007-08-31 07:56:261094 default, but a repository can enable it by setting
Junio C Hamano9d971152012-12-19 00:43:111095 <code>daemon.uploadarch</code> configuration item to <code>true</code>.
Junio C Hamano21e7f9c2007-08-31 07:56:261096</p>
1097</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591098<dt class="hdlist1">
Junio C Hamano21e7f9c2007-08-31 07:56:261099receive-pack
1100</dt>
1101<dd>
1102<p>
Junio C Hamano1aa40d22010-01-21 17:46:431103 This serves <em>git send-pack</em> clients, allowing anonymous
Junio C Hamano68cf15a2010-11-06 01:01:591104 push. It is disabled by default, as there is <em>no</em>
Junio C Hamano21e7f9c2007-08-31 07:56:261105 authentication in the protocol (in other words, anybody
1106 can push anything into the repository, including removal
1107 of refs). This is solely meant for a closed LAN setting
1108 where everybody is friendly. This service can be
Junio C Hamano9d971152012-12-19 00:43:111109 enabled by setting <code>daemon.receivepack</code> configuration item to
1110 <code>true</code>.
Junio C Hamanoa053d542006-10-27 09:29:131111</p>
1112</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311113</dl></div>
Junio C Hamano19ed3682006-09-07 11:44:081114</div>
Junio C Hamano9d971152012-12-19 00:43:111115</div>
1116<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311117<h2 id="_examples">EXAMPLES</h2>
Junio C Hamano47c1e3c2006-09-25 04:45:551118<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591119<div class="dlist"><dl>
1120<dt class="hdlist1">
Junio C Hamanoa053d542006-10-27 09:29:131121We assume the following in /etc/services
1122</dt>
1123<dd>
1124<div class="listingblock">
1125<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111126<pre><code>$ grep 9418 /etc/services
1127git 9418/tcp # Git Version Control System</code></pre>
Junio C Hamanoa053d542006-10-27 09:29:131128</div></div>
1129</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591130<dt class="hdlist1">
Junio C Hamano1aa40d22010-01-21 17:46:431131<em>git daemon</em> as inetd server
Junio C Hamano47c1e3c2006-09-25 04:45:551132</dt>
1133<dd>
1134<p>
Junio C Hamano1aa40d22010-01-21 17:46:431135 To set up <em>git daemon</em> as an inetd service that handles any
Junio C Hamano47c1e3c2006-09-25 04:45:551136 repository under the whitelisted set of directories, /pub/foo
1137 and /pub/bar, place an entry like the following into
1138 /etc/inetd all on one line:
1139</p>
1140<div class="listingblock">
1141<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111142<pre><code> git stream tcp nowait nobody /usr/bin/git
Junio C Hamanofce7c7e2008-07-02 03:06:381143 git daemon --inetd --verbose --export-all
Junio C Hamano9d971152012-12-19 00:43:111144 /pub/foo /pub/bar</code></pre>
Junio C Hamano47c1e3c2006-09-25 04:45:551145</div></div>
1146</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591147<dt class="hdlist1">
Junio C Hamano1aa40d22010-01-21 17:46:431148<em>git daemon</em> as inetd server for virtual hosts
Junio C Hamano47c1e3c2006-09-25 04:45:551149</dt>
1150<dd>
1151<p>
Junio C Hamano1aa40d22010-01-21 17:46:431152 To set up <em>git daemon</em> as an inetd service that handles
Junio C Hamano9d971152012-12-19 00:43:111153 repositories for different virtual hosts, <code>www.example.com</code>
1154 and <code>www.example.org</code>, place an entry like the following into
1155 <code>/etc/inetd</code> all on one line:
Junio C Hamano47c1e3c2006-09-25 04:45:551156</p>
1157<div class="listingblock">
1158<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111159<pre><code> git stream tcp nowait nobody /usr/bin/git
Junio C Hamanofce7c7e2008-07-02 03:06:381160 git daemon --inetd --verbose --export-all
Junio C Hamano47c1e3c2006-09-25 04:45:551161 --interpolated-path=/pub/%H%D
1162 /pub/www.example.org/software
1163 /pub/www.example.com/software
Junio C Hamano9d971152012-12-19 00:43:111164 /software</code></pre>
Junio C Hamano47c1e3c2006-09-25 04:45:551165</div></div>
Junio C Hamano9d971152012-12-19 00:43:111166<div class="paragraph"><p>In this example, the root-level directory <code>/pub</code> will contain
Junio C Hamano47c1e3c2006-09-25 04:45:551167a subdirectory for each virtual host name supported.
1168Further, both hosts advertise repositories simply as
Junio C Hamano9d971152012-12-19 00:43:111169<code>git://www.example.com/software/repo.git</code>. For pre-1.4.0
1170clients, a symlink from <code>/software</code> into the appropriate
Junio C Hamanoba4b9282008-07-06 05:20:311171default repository could be made as well.</p></div>
Junio C Hamano47c1e3c2006-09-25 04:45:551172</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591173<dt class="hdlist1">
Junio C Hamano1aa40d22010-01-21 17:46:431174<em>git daemon</em> as regular daemon for virtual hosts
Junio C Hamano032c6312006-09-28 07:39:181175</dt>
1176<dd>
1177<p>
Junio C Hamano1aa40d22010-01-21 17:46:431178 To set up <em>git daemon</em> as a regular, non-inetd service that
Junio C Hamano032c6312006-09-28 07:39:181179 handles repositories for multiple virtual hosts based on
1180 their IP addresses, start the daemon like this:
1181</p>
1182<div class="listingblock">
1183<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111184<pre><code> git daemon --verbose --export-all
Junio C Hamano032c6312006-09-28 07:39:181185 --interpolated-path=/pub/%IP/%D
1186 /pub/192.168.1.200/software
Junio C Hamano9d971152012-12-19 00:43:111187 /pub/10.10.220.23/software</code></pre>
Junio C Hamano032c6312006-09-28 07:39:181188</div></div>
Junio C Hamano9d971152012-12-19 00:43:111189<div class="paragraph"><p>In this example, the root-level directory <code>/pub</code> will contain
Junio C Hamano032c6312006-09-28 07:39:181190a subdirectory for each virtual host IP address supported.
1191Repositories can still be accessed by hostname though, assuming
Junio C Hamanoba4b9282008-07-06 05:20:311192they correspond to these IP addresses.</p></div>
Junio C Hamano032c6312006-09-28 07:39:181193</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591194<dt class="hdlist1">
Junio C Hamanodbb64592007-09-01 11:17:391195selectively enable/disable services per repository
1196</dt>
1197<dd>
1198<p>
Junio C Hamano1aa40d22010-01-21 17:46:431199 To enable <em>git archive --remote</em> and disable <em>git fetch</em> against
Junio C Hamanodbb64592007-09-01 11:17:391200 a repository, have the following in the configuration file in the
1201 repository (that is the file <em>config</em> next to <em>HEAD</em>, <em>refs</em> and
1202 <em>objects</em>).
1203</p>
Junio C Hamano21e7f9c2007-08-31 07:56:261204<div class="listingblock">
1205<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111206<pre><code> [daemon]
Junio C Hamanodbb64592007-09-01 11:17:391207 uploadpack = false
Junio C Hamano9d971152012-12-19 00:43:111208 uploadarch = true</code></pre>
Junio C Hamano21e7f9c2007-08-31 07:56:261209</div></div>
Junio C Hamanodbb64592007-09-01 11:17:391210</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311211</dl></div>
Junio C Hamano47c1e3c2006-09-25 04:45:551212</div>
Junio C Hamano9d971152012-12-19 00:43:111213</div>
1214<div class="sect1">
Junio C Hamano61b12292008-10-27 02:59:101215<h2 id="_environment">ENVIRONMENT</h2>
1216<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591217<div class="paragraph"><p><em>git daemon</em> will set REMOTE_ADDR to the IP address of the client
Junio C Hamano61b12292008-10-27 02:59:101218that connected to it, if the IP address is available. REMOTE_ADDR will
1219be available in the environment of hooks called when
1220services are performed.</p></div>
1221</div>
Junio C Hamano9d971152012-12-19 00:43:111222</div>
1223<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311224<h2 id="_git">GIT</h2>
Junio C Hamano1a4e8412005-12-27 08:17:231225<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:231226<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:231227</div>
Junio C Hamano7bd050f2011-09-22 06:32:221228</div>
Junio C Hamano9d971152012-12-19 00:43:111229</div>
Junio C Hamano7bd050f2011-09-22 06:32:221230<div id="footnotes"><hr /></div>
Junio C Hamano1a4e8412005-12-27 08:17:231231<div id="footer">
1232<div id="footer-text">
Junio C Hamano3d1b5a12013-05-17 23:34:021233Last updated 2013-05-17 16:33:07 PDT
Junio C Hamano1a4e8412005-12-27 08:17:231234</div>
1235</div>
1236</body>
1237</html>