actually I am using git together with trac. I found a solution of the regular expression match git/[info|git-upload-pack]* that seems work for me And further check of the access.log found it seems not the question mark causing problem, but there is git-upload-pack HTTP/1.1 the HTTP/1.1 make the request is not end with git-upload-pack
Am I right? On Saturday, September 29, 2012 11:40:16 AM UTC-7, Thomas Ferris Nicolaisen wrote: > > On Saturday, September 29, 2012 1:59:24 AM UTC+2, ghuang wrote: > >> following >> http://www.kernel.org/pub/software/scm/git/docs/git-http-backend.html >> >> 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 >> ... >> </LocationMatch> >> >> }}} >> 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? >> > > > If you're willing to drop using pure Git/Apache, and host a Java webapp, > you could try Gitblit <http://gitblit.com/>. It's pretty easy to get > started with, offers push/pull over http(s), and supports finer access > control (groups per repository) out of the box. > > If you want to stick to pure Git/Linux, I've heard many speak warmly of > Gitolite <https://github.com/sitaramc/gitolite>. > -- 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 https://groups.google.com/d/msg/git-users/-/xxBG1roaSCsJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
