From: BJ Hargrave Date: Mon, 27 Aug 2012 13:33:42 GMT Subject: Re: git no longer prompting for password Message-ID: In-Reply-To: <503B2FA9.6030700@gmail.com> On Aug 27, 2012, at 04:28 , Iain Paton wrote: > On 26/08/12 10:57, Iain Paton wrote: > >> > > I've just discovered that the directive only appears in apache 2.4 > so something more generic will probably be a better idea. Not everyone will > be running 2.4.x for a while yet. You could try something like this: # 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 and the other directives in the being protected. -- BJ