From a6080a0a44d5ead84db3dabbbc80e82df838533d Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 7 Jun 2007 00:04:01 -0700 Subject: War on whitespace This uses "git-apply --whitespace=strip" to fix whitespace errors that have crept in to our source files over time. There are a few files that need to have trailing whitespaces (most notably, test vectors). The results still passes the test, and build result in Documentation/ area is unchanged. Signed-off-by: Junio C Hamano --- Documentation/git-daemon.txt | 1 - 1 file changed, 1 deletion(-) (limited to 'Documentation/git-daemon.txt') diff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt index 9ddab71203..4b30b18b42 100644 --- a/Documentation/git-daemon.txt +++ b/Documentation/git-daemon.txt @@ -235,4 +235,3 @@ Documentation by Junio C Hamano and the git-list . GIT --- Part of the gitlink:git[7] suite - -- cgit v1.2.3 From 73a7a65663223d08d8cabac8d873de21b7e9678d Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Fri, 27 Jul 2007 14:00:29 -0700 Subject: --base-path-relaxed option I switched git.kernel.dk to --base-path a few minutes ago, to get rid of a /data/git postfix in the posted urls. But transitioning is tricky, since now all old paths will fail miserably. So I added this --base-path-relaxed option, that will make git-daemon try the absolute path without prefixing --base-path before giving up. With this in place and --base-path-relaxed added, both my new url of git://git.kernel.dk/linux-2.6-block.git and the old git://git.kernel.dk/data/git/linux-2.6-block.git work fine. Signed-off-by: Jens Axboe Signed-off-by: Junio C Hamano --- Documentation/git-daemon.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Documentation/git-daemon.txt') diff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt index 4b30b18b42..f902161c08 100644 --- a/Documentation/git-daemon.txt +++ b/Documentation/git-daemon.txt @@ -54,6 +54,12 @@ OPTIONS 'git://example.com/hello.git', `git-daemon` will interpret the path as '/srv/git/hello.git'. +--base-path-relaxed:: + If --base-path is enabled and repo lookup fails, with this option + `git-daemon` will attempt to lookup without prefixing the base path. + This is useful for switching to --base-path usage, while still + allowing the old paths. + --interpolated-path=pathtemplate:: To support virtual hosting, an interpolated path template can be used to dynamically construct alternate paths. The template -- cgit v1.2.3 From bdd7379566cf7b1f1c9bfe42e794c8f1821971f7 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 29 Aug 2007 03:32:12 -0700 Subject: git-daemon(1): assorted improvements. Jari Aalto noticed a handful places in git-daemon documentation that need to be improved. * --inetd makes --pid-file to be ignored, in addition to --user and --group * receive-pack service was not described at all. We should, if only to warn about the security implications of it. * There was no example of per repository configuration. Signed-off-by: Junio C Hamano --- Documentation/git-daemon.txt | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) (limited to 'Documentation/git-daemon.txt') diff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt index f902161c08..efdcdadea7 100644 --- a/Documentation/git-daemon.txt +++ b/Documentation/git-daemon.txt @@ -124,7 +124,8 @@ OPTIONS Detach from the shell. Implies --syslog. --pid-file=file:: - Save the process id in 'file'. + Save the process id in 'file'. Ignored when the daemon + is run under `--inetd`. --user=user, --group=group:: Change daemon's uid and gid before entering the service loop. @@ -157,6 +158,13 @@ the facility of inet daemon to achieve the same before spawning SERVICES -------- +These services can be globally enabled/disabled using the +command line options of this command. If a finer-grained +control is desired (e.g. to allow `git-archive` to be run +against only in a few selected repositories the daemon serves), +the per-repository configuration file can be used to enable or +disable them. + upload-pack:: This serves `git-fetch-pack` and `git-peek-remote` clients. It is enabled by default, but a repository can @@ -164,7 +172,19 @@ upload-pack:: item to `false`. upload-archive:: - This serves `git-archive --remote`. + This serves `git-archive --remote`. It is disabled by + default, but a repository can enable it by setting + `daemon.uploadarchive` configuration item to `true`. + +receive-pack:: + This serves `git-send-pack` clients, allowing anonymous + push. It is disabled by default, as there is _no_ + authentication in the protocol (in other words, anybody + can push anything into the repository, including removal + of refs). This is solely meant for a closed LAN setting + where everybody is friendly. This service can be + enabled by `daemon.receivepack` configuration item to + `true`. EXAMPLES -------- @@ -229,6 +249,18 @@ Repositories can still be accessed by hostname though, assuming they correspond to these IP addresses. +To enable `git-archive --remote` and disable `git-fetch` against +a repository, have the following in the configuration file in the +repository (that is the file 'config' next to 'HEAD', 'refs' and +'objects'). ++ +---------------------------------------------------------------- +[daemon] + uploadpack = false + uploadarchive = true +---------------------------------------------------------------- + + Author ------ Written by Linus Torvalds , YOSHIFUJI Hideaki -- cgit v1.2.3 From f368f5a6bc11855ab11013bc0c550bfc0868c140 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 1 Sep 2007 04:01:54 -0700 Subject: Documentation: minor AsciiDoc mark-up fixes. Signed-off-by: Junio C Hamano --- Documentation/git-daemon.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Documentation/git-daemon.txt') diff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt index efdcdadea7..99e47c9c25 100644 --- a/Documentation/git-daemon.txt +++ b/Documentation/git-daemon.txt @@ -248,16 +248,16 @@ a subdirectory for each virtual host IP address supported. Repositories can still be accessed by hostname though, assuming they correspond to these IP addresses. - -To enable `git-archive --remote` and disable `git-fetch` against -a repository, have the following in the configuration file in the -repository (that is the file 'config' next to 'HEAD', 'refs' and -'objects'). +selectively enable/disable services per repository:: + To enable `git-archive --remote` and disable `git-fetch` against + a repository, have the following in the configuration file in the + repository (that is the file 'config' next to 'HEAD', 'refs' and + 'objects'). + ---------------------------------------------------------------- -[daemon] - uploadpack = false - uploadarchive = true + [daemon] + uploadpack = false + uploadarchive = true ---------------------------------------------------------------- -- cgit v1.2.3 From f029427259c97af9ea98358866e1d28974fa4da5 Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Mon, 17 Dec 2007 10:08:23 +0100 Subject: Clean up documentation that references deprecated 'git peek-remote'. Now that 'git peek-remote' is deprecated and only an alias for 'git ls-remote', it should not be referenced from other manual pages. This also removes the description of the --exec option, which is no longer present. Signed-off-by: Johannes Sixt Signed-off-by: Junio C Hamano --- Documentation/git-daemon.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Documentation/git-daemon.txt') diff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt index 99e47c9c25..f1e48dd021 100644 --- a/Documentation/git-daemon.txt +++ b/Documentation/git-daemon.txt @@ -31,8 +31,8 @@ pass some directory paths as 'git-daemon' arguments, you can further restrict the offers to a whitelist comprising of those. By default, only `upload-pack` service is enabled, which serves -`git-fetch-pack` and `git-peek-remote` clients that are invoked -from `git-fetch`, `git-ls-remote`, and `git-clone`. +`git-fetch-pack` and `git-ls-remote` clients, which are invoked +from `git-fetch`, `git-pull`, and `git-clone`. This is ideally suited for read-only updates, i.e., pulling from git repositories. @@ -166,7 +166,7 @@ the per-repository configuration file can be used to enable or disable them. upload-pack:: - This serves `git-fetch-pack` and `git-peek-remote` + This serves `git-fetch-pack` and `git-ls-remote` clients. It is enabled by default, but a repository can disable it by setting `daemon.uploadpack` configuration item to `false`. -- cgit v1.2.3 From 5162e69732d13dd079919a389a6ace8878aad716 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 29 Dec 2007 00:20:38 -0600 Subject: Documentation: rename gitlink macro to linkgit Between AsciiDoc 8.2.2 and 8.2.3, the following change was made to the stock Asciidoc configuration: @@ -149,7 +153,10 @@ # Inline macros. # Backslash prefix required for escape processing. # (?s) re flag for line spanning. -(?su)[\\]?(?P\w(\w|-)*?):(?P\S*?)(\[(?P.*?)\])= + +# Explicit so they can be nested. +(?su)[\\]?(?P(http|https|ftp|file|mailto|callto|image|link)):(?P\S*?)(\[(?P.*?)\])= + # Anchor: [[[id]]]. Bibliographic anchor. (?su)[\\]?\[\[\[(?P[\w][\w-]*?)\]\]\]=anchor3 # Anchor: [[id,xreflabel]] This default regex now matches explicit values, and unfortunately in this case gitlink was being matched by just 'link', causing the wrong inline macro template to be applied. By renaming the macro, we can avoid being matched by the wrong regex. Signed-off-by: Dan McGee Signed-off-by: Junio C Hamano --- Documentation/git-daemon.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation/git-daemon.txt') diff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt index f1e48dd021..fd83bc7833 100644 --- a/Documentation/git-daemon.txt +++ b/Documentation/git-daemon.txt @@ -272,4 +272,4 @@ Documentation by Junio C Hamano and the git-list . GIT --- -Part of the gitlink:git[7] suite +Part of the linkgit:git[7] suite -- cgit v1.2.3 From 74190d2363a1be81b06992bebbff6bd59f943fe7 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Mon, 19 May 2008 16:08:33 -0400 Subject: doc/git-daemon: s/uploadarchive/uploadarch/ The git-daemon upload-archive feature has always used the config directive 'daemon.uploadarch'; the documentation which came later seems to have just mistakenly used the wrong name. Noticed by lionel@over-blog.com. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- Documentation/git-daemon.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Documentation/git-daemon.txt') diff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt index fd83bc7833..cf261dd40d 100644 --- a/Documentation/git-daemon.txt +++ b/Documentation/git-daemon.txt @@ -174,7 +174,7 @@ upload-pack:: upload-archive:: This serves `git-archive --remote`. It is disabled by default, but a repository can enable it by setting - `daemon.uploadarchive` configuration item to `true`. + `daemon.uploadarch` configuration item to `true`. receive-pack:: This serves `git-send-pack` clients, allowing anonymous @@ -257,7 +257,7 @@ selectively enable/disable services per repository:: ---------------------------------------------------------------- [daemon] uploadpack = false - uploadarchive = true + uploadarch = true ---------------------------------------------------------------- -- cgit v1.2.3 From 9e1f0a85c68323830ea117092c55192b17aa3ac8 Mon Sep 17 00:00:00 2001 From: Christian Couder Date: Fri, 6 Jun 2008 09:07:32 +0200 Subject: documentation: move git(7) to git(1) As the "git" man page describes the "git" command at the end-user level, it seems better to move it to man section 1. Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano --- Documentation/git-daemon.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation/git-daemon.txt') diff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt index cf261dd40d..3fb71d683e 100644 --- a/Documentation/git-daemon.txt +++ b/Documentation/git-daemon.txt @@ -272,4 +272,4 @@ Documentation by Junio C Hamano and the git-list . GIT --- -Part of the linkgit:git[7] suite +Part of the linkgit:git[1] suite -- cgit v1.2.3 From 3240240ff427fa2e26a847c7c9fd89e6a4313daa Mon Sep 17 00:00:00 2001 From: Stephan Beyer Date: Sun, 8 Jun 2008 03:36:09 +0200 Subject: Docs: Use "-l::\n--long\n" format in OPTIONS sections The OPTIONS section of a documentation file contains a list of the options a git command accepts. Currently there are several variants to describe the case that different options (almost) do the same in the OPTIONS section. Some are: -f, --foo:: -f|--foo:: -f | --foo:: But AsciiDoc has the special form: -f:: --foo:: This patch applies this form to the documentation of the whole git suite, and removes useless em-dash prevention, so \--foo becomes --foo. Signed-off-by: Stephan Beyer Signed-off-by: Junio C Hamano --- Documentation/git-daemon.txt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'Documentation/git-daemon.txt') diff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt index 3fb71d683e..344f24ea59 100644 --- a/Documentation/git-daemon.txt +++ b/Documentation/git-daemon.txt @@ -103,7 +103,8 @@ OPTIONS Log to syslog instead of stderr. Note that this option does not imply --verbose, thus by default only error conditions will be logged. ---user-path, --user-path=path:: +--user-path:: +--user-path=path:: Allow ~user notation to be used in requests. When specified with no parameter, requests to git://host/~alice/foo is taken as a request to access @@ -127,7 +128,8 @@ OPTIONS Save the process id in 'file'. Ignored when the daemon is run under `--inetd`. ---user=user, --group=group:: +--user=user:: +--group=group:: Change daemon's uid and gid before entering the service loop. When only `--user` is given without `--group`, the primary group ID for the user is used. The values of @@ -138,14 +140,16 @@ Giving these options is an error when used with `--inetd`; use the facility of inet daemon to achieve the same before spawning `git-daemon` if needed. ---enable=service, --disable=service:: +--enable=service:: +--disable=service:: Enable/disable the service site-wide per default. Note that a service disabled site-wide can still be enabled per repository if it is marked overridable and the repository enables the service with an configuration item. ---allow-override=service, --forbid-override=service:: +--allow-override=service:: +--forbid-override=service:: Allow/forbid overriding the site-wide default with per repository configuration. By default, all the services are overridable. -- cgit v1.2.3 From 963a653fa635c6b07ed399b2fafca2a4d7866a21 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Mon, 30 Jun 2008 17:15:57 -0500 Subject: git-daemon(1): don't assume git-daemon is in /usr/bin In the example inetd.conf lines in git-daemon(1), it was assumed that `git-daemon` resides in the user's /usr/bin. With this patch, we only assume `git` is in /usr/bin. The stronger assumption fails in the default installation nowadays. Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Documentation/git-daemon.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Documentation/git-daemon.txt') diff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt index 344f24ea59..b71eb94d54 100644 --- a/Documentation/git-daemon.txt +++ b/Documentation/git-daemon.txt @@ -206,8 +206,8 @@ git-daemon as inetd server:: /etc/inetd all on one line: + ------------------------------------------------ - git stream tcp nowait nobody /usr/bin/git-daemon - git-daemon --inetd --verbose --export-all + git stream tcp nowait nobody /usr/bin/git + git daemon --inetd --verbose --export-all /pub/foo /pub/bar ------------------------------------------------ @@ -219,8 +219,8 @@ git-daemon as inetd server for virtual hosts:: `/etc/inetd` all on one line: + ------------------------------------------------ - git stream tcp nowait nobody /usr/bin/git-daemon - git-daemon --inetd --verbose --export-all + git stream tcp nowait nobody /usr/bin/git + git daemon --inetd --verbose --export-all --interpolated-path=/pub/%H%D /pub/www.example.org/software /pub/www.example.com/software @@ -241,7 +241,7 @@ git-daemon as regular daemon for virtual hosts:: their IP addresses, start the daemon like this: + ------------------------------------------------ - git-daemon --verbose --export-all + git daemon --verbose --export-all --interpolated-path=/pub/%IP/%D /pub/192.168.1.200/software /pub/10.10.220.23/software -- cgit v1.2.3 From b1889c36d85514e5e70462294c561a02c2edfe2b Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Mon, 30 Jun 2008 01:09:04 -0500 Subject: Documentation: be consistent about "git-" versus "git " Since the git-* commands are not installed in $(bindir), using "git-command " in examples in the documentation is not a good idea. On the other hand, it is nice to be able to refer to each command using one hyphenated word. (There is no escaping it, anyway: man page names cannot have spaces in them.) This patch retains the dash in naming an operation, command, program, process, or action. Complete command lines that can be entered at a shell (i.e., without options omitted) are made to use the dashless form. The changes consist only of replacing some spaces with hyphens and vice versa. After a "s/ /-/g", the unpatched and patched versions are identical. Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Documentation/git-daemon.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation/git-daemon.txt') diff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt index b71eb94d54..266458bed8 100644 --- a/Documentation/git-daemon.txt +++ b/Documentation/git-daemon.txt @@ -8,7 +8,7 @@ git-daemon - A really simple server for git repositories SYNOPSIS -------- [verse] -'git-daemon' [--verbose] [--syslog] [--export-all] +'git daemon' [--verbose] [--syslog] [--export-all] [--timeout=n] [--init-timeout=n] [--strict-paths] [--base-path=path] [--user-path | --user-path=path] [--interpolated-path=pathtemplate] -- cgit v1.2.3 From 483bc4f045881b998512ae814d6cf44d0c0cb493 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Mon, 30 Jun 2008 13:56:34 -0500 Subject: Documentation formatting and cleanup Following what appears to be the predominant style, format names of commands and commandlines both as `teletype text`. While we're at it, add articles ("a" and "the") in some places, italicize the name of the command in the manual page synopsis line, and add a comma or two where it seems appropriate. Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Documentation/git-daemon.txt | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'Documentation/git-daemon.txt') diff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt index 266458bed8..3cf2d3b3d4 100644 --- a/Documentation/git-daemon.txt +++ b/Documentation/git-daemon.txt @@ -9,11 +9,11 @@ SYNOPSIS -------- [verse] 'git daemon' [--verbose] [--syslog] [--export-all] - [--timeout=n] [--init-timeout=n] [--strict-paths] - [--base-path=path] [--user-path | --user-path=path] - [--interpolated-path=pathtemplate] - [--reuseaddr] [--detach] [--pid-file=file] - [--enable=service] [--disable=service] + [--timeout=n] [--init-timeout=n] [--strict-paths] + [--base-path=path] [--user-path | --user-path=path] + [--interpolated-path=pathtemplate] + [--reuseaddr] [--detach] [--pid-file=file] + [--enable=service] [--disable=service] [--allow-override=service] [--forbid-override=service] [--inetd | [--listen=host_or_ipaddr] [--port=n] [--user=user [--group=group]] [directory...] @@ -27,7 +27,7 @@ that service if it is enabled. It verifies that the directory has the magic file "git-daemon-export-ok", and it will refuse to export any git directory that hasn't explicitly been marked for export this way (unless the '--export-all' parameter is specified). If you -pass some directory paths as 'git-daemon' arguments, you can further restrict +pass some directory paths as `git-daemon` arguments, you can further restrict the offers to a whitelist comprising of those. By default, only `upload-pack` service is enabled, which serves @@ -44,12 +44,12 @@ OPTIONS --strict-paths:: Match paths exactly (i.e. don't allow "/foo/repo" when the real path is "/foo/repo.git" or "/foo/repo/.git") and don't do user-relative paths. - git-daemon will refuse to start when this option is enabled and no + `git-daemon` will refuse to start when this option is enabled and no whitelist is specified. --base-path:: Remap all the path requests as relative to the given path. - This is sort of "GIT root" - if you run git-daemon with + This is sort of "GIT root" - if you run `git-daemon` with '--base-path=/srv/git' on example.com, then if you later try to pull 'git://example.com/hello.git', `git-daemon` will interpret the path as '/srv/git/hello.git'. @@ -199,7 +199,7 @@ $ grep 9418 /etc/services git 9418/tcp # Git Version Control System ------------ -git-daemon as inetd server:: +`git-daemon` as inetd server:: To set up `git-daemon` as an inetd service that handles any repository under the whitelisted set of directories, /pub/foo and /pub/bar, place an entry like the following into @@ -212,7 +212,7 @@ git-daemon as inetd server:: ------------------------------------------------ -git-daemon as inetd server for virtual hosts:: +`git-daemon` as inetd server for virtual hosts:: To set up `git-daemon` as an inetd service that handles repositories for different virtual hosts, `www.example.com` and `www.example.org`, place an entry like the following into @@ -235,7 +235,7 @@ clients, a symlink from `/software` into the appropriate default repository could be made as well. -git-daemon as regular daemon for virtual hosts:: +`git-daemon` as regular daemon for virtual hosts:: To set up `git-daemon` as a regular, non-inetd service that handles repositories for multiple virtual hosts based on their IP addresses, start the daemon like this: -- cgit v1.2.3 From ba020ef5eb5fca3d757bd580ff117adaf81ca079 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Thu, 3 Jul 2008 00:41:41 -0500 Subject: manpages: italicize git command names (which were in teletype font) The names of git commands are not meant to be entered at the commandline; they are just names. So we render them in italics, as is usual for command names in manpages. Using doit () { perl -e 'for (<>) { s/\`(git-[^\`.]*)\`/'\''\1'\''/g; print }' } for i in git*.txt config.txt diff*.txt blame*.txt fetch*.txt i18n.txt \ merge*.txt pretty*.txt pull*.txt rev*.txt urls*.txt do doit <"$i" >"$i+" && mv "$i+" "$i" done git diff . Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Documentation/git-daemon.txt | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'Documentation/git-daemon.txt') diff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt index 3cf2d3b3d4..4ba4b75c11 100644 --- a/Documentation/git-daemon.txt +++ b/Documentation/git-daemon.txt @@ -27,36 +27,36 @@ that service if it is enabled. It verifies that the directory has the magic file "git-daemon-export-ok", and it will refuse to export any git directory that hasn't explicitly been marked for export this way (unless the '--export-all' parameter is specified). If you -pass some directory paths as `git-daemon` arguments, you can further restrict +pass some directory paths as 'git-daemon' arguments, you can further restrict the offers to a whitelist comprising of those. By default, only `upload-pack` service is enabled, which serves -`git-fetch-pack` and `git-ls-remote` clients, which are invoked -from `git-fetch`, `git-pull`, and `git-clone`. +'git-fetch-pack' and 'git-ls-remote' clients, which are invoked +from 'git-fetch', 'git-pull', and 'git-clone'. This is ideally suited for read-only updates, i.e., pulling from git repositories. -An `upload-archive` also exists to serve `git-archive`. +An `upload-archive` also exists to serve 'git-archive'. OPTIONS ------- --strict-paths:: Match paths exactly (i.e. don't allow "/foo/repo" when the real path is "/foo/repo.git" or "/foo/repo/.git") and don't do user-relative paths. - `git-daemon` will refuse to start when this option is enabled and no + 'git-daemon' will refuse to start when this option is enabled and no whitelist is specified. --base-path:: Remap all the path requests as relative to the given path. - This is sort of "GIT root" - if you run `git-daemon` with + This is sort of "GIT root" - if you run 'git-daemon' with '--base-path=/srv/git' on example.com, then if you later try to pull - 'git://example.com/hello.git', `git-daemon` will interpret the path + 'git://example.com/hello.git', 'git-daemon' will interpret the path as '/srv/git/hello.git'. --base-path-relaxed:: If --base-path is enabled and repo lookup fails, with this option - `git-daemon` will attempt to lookup without prefixing the base path. + 'git-daemon' will attempt to lookup without prefixing the base path. This is useful for switching to --base-path usage, while still allowing the old paths. @@ -138,7 +138,7 @@ OPTIONS + Giving these options is an error when used with `--inetd`; use the facility of inet daemon to achieve the same before spawning -`git-daemon` if needed. +'git-daemon' if needed. --enable=service:: --disable=service:: @@ -164,24 +164,24 @@ SERVICES These services can be globally enabled/disabled using the command line options of this command. If a finer-grained -control is desired (e.g. to allow `git-archive` to be run +control is desired (e.g. to allow 'git-archive' to be run against only in a few selected repositories the daemon serves), the per-repository configuration file can be used to enable or disable them. upload-pack:: - This serves `git-fetch-pack` and `git-ls-remote` + This serves 'git-fetch-pack' and 'git-ls-remote' clients. It is enabled by default, but a repository can disable it by setting `daemon.uploadpack` configuration item to `false`. upload-archive:: - This serves `git-archive --remote`. It is disabled by + This serves 'git-archive --remote'. It is disabled by default, but a repository can enable it by setting `daemon.uploadarch` configuration item to `true`. receive-pack:: - This serves `git-send-pack` clients, allowing anonymous + This serves 'git-send-pack' clients, allowing anonymous push. It is disabled by default, as there is _no_ authentication in the protocol (in other words, anybody can push anything into the repository, including removal @@ -199,8 +199,8 @@ $ grep 9418 /etc/services git 9418/tcp # Git Version Control System ------------ -`git-daemon` as inetd server:: - To set up `git-daemon` as an inetd service that handles any +'git-daemon' as inetd server:: + To set up 'git-daemon' as an inetd service that handles any repository under the whitelisted set of directories, /pub/foo and /pub/bar, place an entry like the following into /etc/inetd all on one line: @@ -212,8 +212,8 @@ git 9418/tcp # Git Version Control System ------------------------------------------------ -`git-daemon` as inetd server for virtual hosts:: - To set up `git-daemon` as an inetd service that handles +'git-daemon' as inetd server for virtual hosts:: + To set up 'git-daemon' as an inetd service that handles repositories for different virtual hosts, `www.example.com` and `www.example.org`, place an entry like the following into `/etc/inetd` all on one line: @@ -235,8 +235,8 @@ clients, a symlink from `/software` into the appropriate default repository could be made as well. -`git-daemon` as regular daemon for virtual hosts:: - To set up `git-daemon` as a regular, non-inetd service that +'git-daemon' as regular daemon for virtual hosts:: + To set up 'git-daemon' as a regular, non-inetd service that handles repositories for multiple virtual hosts based on their IP addresses, start the daemon like this: + @@ -253,7 +253,7 @@ Repositories can still be accessed by hostname though, assuming they correspond to these IP addresses. selectively enable/disable services per repository:: - To enable `git-archive --remote` and disable `git-fetch` against + To enable 'git-archive --remote' and disable 'git-fetch' against a repository, have the following in the configuration file in the repository (that is the file 'config' next to 'HEAD', 'refs' and 'objects'). -- cgit v1.2.3 From 3bd62c21760f92996569bb9335b399a9545a5c41 Mon Sep 17 00:00:00 2001 From: "Stephen R. van den Berg" Date: Thu, 14 Aug 2008 20:02:20 +0200 Subject: git-daemon: rewrite kindergarden, new option --max-connections Get rid of the fixed array of children and make max-connections dynamic and configurable. Fix the killing code to actually kill the newest connections from duplicate IP-addresses. Avoid forking if too busy already. Signed-off-by: Stephen R. van den Berg Signed-off-by: Junio C Hamano --- Documentation/git-daemon.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Documentation/git-daemon.txt') diff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt index 4ba4b75c11..b08a08cd95 100644 --- a/Documentation/git-daemon.txt +++ b/Documentation/git-daemon.txt @@ -9,8 +9,9 @@ SYNOPSIS -------- [verse] 'git daemon' [--verbose] [--syslog] [--export-all] - [--timeout=n] [--init-timeout=n] [--strict-paths] - [--base-path=path] [--user-path | --user-path=path] + [--timeout=n] [--init-timeout=n] [--max-connections=n] + [--strict-paths] [--base-path=path] [--base-path-relaxed] + [--user-path | --user-path=path] [--interpolated-path=pathtemplate] [--reuseaddr] [--detach] [--pid-file=file] [--enable=service] [--disable=service] @@ -99,6 +100,10 @@ OPTIONS it takes for the server to process the sub-request and time spent waiting for next client's request. +--max-connections:: + Maximum number of concurrent clients, defaults to 32. Set it to + zero for no limit. + --syslog:: Log to syslog instead of stderr. Note that this option does not imply --verbose, thus by default only error conditions will be logged. -- cgit v1.2.3 From 53ffb878a94c3eae7c7f57e05568aedcfb77e57f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 24 Oct 2008 01:48:50 -0400 Subject: git-daemon: set REMOTE_ADDR to client address This allows hooks like pre-receive to look at the client's IP address. Of course the IP address can't be used to get strong security; git-daemon isn't the right thing to use if you need that. However, basic IP address checking can be good enough in some situations. REMOTE_ADDR is the same environment variable used to communicate the client's address to CGI scripts. Signed-off-by: Joey Hess Signed-off-by: Junio C Hamano --- Documentation/git-daemon.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Documentation/git-daemon.txt') diff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt index b08a08cd95..f1a570a874 100644 --- a/Documentation/git-daemon.txt +++ b/Documentation/git-daemon.txt @@ -270,6 +270,15 @@ selectively enable/disable services per repository:: ---------------------------------------------------------------- +ENVIRONMENT +----------- +'git-daemon' will set REMOTE_ADDR to the IP address of the client +that connected to it, if the IP address is available. REMOTE_ADDR will +be available in the environment of hooks called when +services are performed. + + + Author ------ Written by Linus Torvalds , YOSHIFUJI Hideaki -- cgit v1.2.3 From 4fce51cf415909be84e3a1449900e3fdea775b76 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 16 Dec 2008 16:48:12 +0100 Subject: git-daemon documentation: use {tilde} Use '{tilde}' instead of '~', becase the later does not appear in the manpage version, just in the HTML one. Noticed by gonzzor on IRC. Signed-off-by: Miklos Vajna Signed-off-by: Junio C Hamano --- Documentation/git-daemon.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Documentation/git-daemon.txt') diff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt index f1a570a874..36f00aed67 100644 --- a/Documentation/git-daemon.txt +++ b/Documentation/git-daemon.txt @@ -110,9 +110,9 @@ OPTIONS --user-path:: --user-path=path:: - Allow ~user notation to be used in requests. When + Allow {tilde}user notation to be used in requests. When specified with no parameter, requests to - git://host/~alice/foo is taken as a request to access + git://host/{tilde}alice/foo is taken as a request to access 'foo' repository in the home directory of user `alice`. If `--user-path=path` is specified, the same request is taken as a request to access `path/foo` repository in -- cgit v1.2.3 From 62854410449ec407a363e4bb1dc980a75aa1699d Mon Sep 17 00:00:00 2001 From: Markus Heidelberg Date: Sat, 18 Apr 2009 11:46:06 +0200 Subject: doc/git-daemon: add missing arguments to options Also fix some spellings and typos. Signed-off-by: Markus Heidelberg Signed-off-by: Junio C Hamano --- Documentation/git-daemon.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Documentation/git-daemon.txt') diff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt index 4ba4b75c11..2172e1fedc 100644 --- a/Documentation/git-daemon.txt +++ b/Documentation/git-daemon.txt @@ -47,7 +47,7 @@ OPTIONS 'git-daemon' will refuse to start when this option is enabled and no whitelist is specified. ---base-path:: +--base-path=path:: Remap all the path requests as relative to the given path. This is sort of "GIT root" - if you run 'git-daemon' with '--base-path=/srv/git' on example.com, then if you later try to pull @@ -80,8 +80,8 @@ OPTIONS Incompatible with --port, --listen, --user and --group options. --listen=host_or_ipaddr:: - Listen on an a specific IP address or hostname. IP addresses can - be either an IPv4 address or an IPV6 address if supported. If IPv6 + Listen on a specific IP address or hostname. IP addresses can + be either an IPv4 address or an IPv6 address if supported. If IPv6 is not supported, then --listen=hostname is also not supported and --listen must be given an IPv4 address. Incompatible with '--inetd' option. @@ -89,15 +89,15 @@ OPTIONS --port=n:: Listen on an alternative port. Incompatible with '--inetd' option. ---init-timeout:: +--init-timeout=n:: Timeout between the moment the connection is established and the client request is received (typically a rather low value, since that should be basically immediate). ---timeout:: +--timeout=n:: Timeout for specific client sub-requests. This includes the time - it takes for the server to process the sub-request and time spent - waiting for next client's request. + it takes for the server to process the sub-request and the time spent + waiting for the next client's request. --syslog:: Log to syslog instead of stderr. Note that this option does not imply @@ -145,7 +145,7 @@ the facility of inet daemon to achieve the same before spawning Enable/disable the service site-wide per default. Note that a service disabled site-wide can still be enabled per repository if it is marked overridable and the - repository enables the service with an configuration + repository enables the service with a configuration item. --allow-override=service:: -- cgit v1.2.3 From 2aa3140bc07d7b593efe2d963d8d9b0a9a0cbf05 Mon Sep 17 00:00:00 2001 From: Markus Heidelberg Date: Sat, 18 Apr 2009 11:46:06 +0200 Subject: doc/git-daemon: add missing arguments to max-connections option Signed-off-by: Markus Heidelberg Signed-off-by: Junio C Hamano --- Documentation/git-daemon.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation/git-daemon.txt') diff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt index d5596672a5..a85121c689 100644 --- a/Documentation/git-daemon.txt +++ b/Documentation/git-daemon.txt @@ -100,7 +100,7 @@ OPTIONS it takes for the server to process the sub-request and the time spent waiting for the next client's request. ---max-connections:: +--max-connections=n:: Maximum number of concurrent clients, defaults to 32. Set it to zero for no limit. -- cgit v1.2.3