diff options
author | Jeff King <peff@peff.net> | 2012-08-27 17:25:53 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-08-27 21:49:09 +0400 |
commit | 4c71009da60baee436358e84ff1057cd1c80e776 (patch) | |
tree | d311a3b85502a817f37a17964838b826b21daecd /t/lib-httpd/apache.conf | |
parent | 6ac2b3aeb9900a8fb0cd3fd9be0bff00eb3a4b5b (diff) |
t: test http access to "half-auth" repositories
Some sites set up http access to repositories such that
fetching is anonymous and unauthenticated, but pushing is
authenticated. While there are multiple ways to do this, the
technique advertised in the git-http-backend manpage is to
block access to locations matching "/git-receive-pack$".
Let's emulate that advice in our test setup, which makes it
clear that this advice does not actually work.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/lib-httpd/apache.conf')
-rw-r--r-- | t/lib-httpd/apache.conf | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/t/lib-httpd/apache.conf b/t/lib-httpd/apache.conf index 616486f9ea..ec8618dfde 100644 --- a/t/lib-httpd/apache.conf +++ b/t/lib-httpd/apache.conf @@ -89,6 +89,13 @@ SSLEngine On Require valid-user </Location> +<LocationMatch "^/auth-push/.*/git-receive-pack$"> + AuthType Basic + AuthName "git-auth" + AuthUserFile passwd + Require valid-user +</LocationMatch> + <IfDefine DAV> LoadModule dav_module modules/mod_dav.so LoadModule dav_fs_module modules/mod_dav_fs.so |