From: Junio C Hamano Date: Wed, 9 Apr 2014 18:45:04 +0000 (-0700) Subject: Merge commit 'doc/http-backend: missing accent grave in literal mark-up' X-Git-Tag: v1.9.2~6 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/efb4ec68b82aa003e18c1731e17503d3bf8d15f4?ds=inline;hp=-c Merge commit 'doc/http-backend: missing accent grave in literal mark-up' * commit '5df05146d5cb94628a3dfc53063c802ee1152cec': doc/http-backend: missing accent grave in literal mark-up --- efb4ec68b82aa003e18c1731e17503d3bf8d15f4 diff --combined Documentation/git-http-backend.txt index e8c13f60ae,8d0da1519b..d422ba4b59 --- a/Documentation/git-http-backend.txt +++ b/Documentation/git-http-backend.txt @@@ -80,30 -80,7 +80,30 @@@ ScriptAlias /git/ /usr/libexec/git-core ---------------------------------------------------------------- + To enable anonymous read access but authenticated write access, -require authorization with a LocationMatch directive: +require authorization for both the initial ref advertisement (which we +detect as a push via the service parameter in the query string), and the +receive-pack invocation itself: ++ +---------------------------------------------------------------- +RewriteCond %{QUERY_STRING} service=git-receive-pack [OR] +RewriteCond %{REQUEST_URI} /git-receive-pack$ +RewriteRule ^/git/ - [E=AUTHREQUIRED:yes] + + + Order Deny,Allow + Deny from env=AUTHREQUIRED + + AuthType Basic + AuthName "Git Access" + Require group committers + Satisfy Any + ... + +---------------------------------------------------------------- ++ +If you do not have `mod_rewrite` available to match against the query +string, it is sufficient to just protect `git-receive-pack` itself, +like: + ---------------------------------------------------------------- @@@ -191,7 -168,7 +191,7 @@@ ScriptAlias /git/ /var/www/cgi-bin/gitw ---------------------------------------------------------------- Lighttpd:: - Ensure that `mod_cgi`, `mod_alias, `mod_auth`, `mod_setenv` are + Ensure that `mod_cgi`, `mod_alias`, `mod_auth`, `mod_setenv` are loaded, then set `GIT_PROJECT_ROOT` appropriately and redirect all requests to the CGI: + @@@ -230,6 -207,13 +230,6 @@@ auth.require = # ...and set up auth.backend here ---------------------------------------------------------------- + -Note that unlike the similar setup with Apache, we can easily match the -query string for receive-pack, catching the initial request from the -client. This means that the server administrator does not have to worry -about configuring `http.receivepack` for the repositories (the default -value, which enables it only in the case of authentication, is -sufficient). -+ To require authentication for both reads and writes: + ---------------------------------------------------------------- @@@ -263,6 -247,14 +263,6 @@@ identifying information of the remote u All CGI environment variables are available to each of the hooks invoked by the 'git-receive-pack'. -Author ------- -Written by Shawn O. Pearce . - -Documentation --------------- -Documentation by Shawn O. Pearce . - GIT --- Part of the linkgit:git[1] suite