I have the anonymous git clone work 

if I set this


<Location /git/private> AuthType Basic AuthName "Private Git Access" 
Require group committers ... </Location>

that seems work.
but if I following the manual want anonymous download and authenticated write 
like this

To enable anonymous read access but authenticated write access, require 
authorization with a LocationMatch directive:
<LocationMatch "^/git/.*/git-receive-pack$">
        AuthType Basic
        AuthName "Git Access"
        Require group committers

seems every time the server got 

/git/info/refs?service=git-upload-pack HTTP/1.1" 401 726 

because of the question mark in the request uri, the regular expression 
doesn't work, so it didn't ask me the password and give failure.

What I really want to do is like this:

separate user in two groups: dev and user

anonymous: no access, can not git clone
user group: can clone, but can not push, both require authentication
dev group: can clone and push. both require authentication

I was trying to use 

<LocationMatch "^/git/.*/git-receive-pack$">
and for push 
and use a 
<LocationMatch "^/git/.*/git-upload-pack$">

for clone. 

but because of those question mark, it doesn't work

Does anyone have good solution?

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To view this discussion on the web visit
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to