On Aug 27, 2012, at 04:28 , Iain Paton wrote:
You could try something like this:
<Location /git>
# Require authentication for git push
RewriteCond %{QUERY_STRING} service=git-receive-pack
RewriteRule .* - [E=AUTHREQUIRED:yes]
Order Allow,Deny
Deny from env=AUTHREQUIRED
Allow from all
Satisfy Any
# Whatever auth rules you want ...I haven't tested this specific example but it is based upon similar rules I use on a 2.0 server to require auth when specific query parameters are present. In my case, I have the Rewrite rules in the <VirtualHost> and the other directives in the <Directory> being protected.