Re: git-http-backend: anonymous read, authenticated write

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 10, 2013 at 10:45:44PM +0200, Magnus Therning wrote:

> I was putting together a *long* response, with my different
> configurations when it suddenly hit me how to make it work.
> 
> So, this is the accesslog for a successful `git push`:
> 
> 192.168.1.84 tracsrv.local - [10/Apr/2013:22:24:59 +0200] "GET /git/foo.git/info/refs?service=git-receive-pack HTTP/1.1" 401 351 "-" "git/1.8.2.1"
> 192.168.1.84 tracsrv.local - [10/Apr/2013:22:24:59 +0200] "GET /git/foo.git/info/refs?service=git-receive-pack HTTP/1.1" 401 351 "-" "git/1.8.2.1"
> 192.168.1.84 tracsrv.local magnus [10/Apr/2013:22:25:04 +0200] "GET /git/foo.git/info/refs?service=git-receive-pack HTTP/1.1" 200 202 "-" "git/1.8.2.1"
> 192.168.1.84 tracsrv.local magnus [10/Apr/2013:22:25:09 +0200] "POST /git/foo.git/git-receive-pack HTTP/1.1" 200 73 "-" "git/1.8.2.1"
> 
> That is, *both* the GET and POST queries require a valid username
> (trying to push without a valid user will fail with a 403 already on
> the GET query).  Maybe Apache 2.x simply behaves *very* differently
> from lighttpd, but I still can't see how a rule to require a valid
> user only on the POST can ever work.

Right. But that is not configured at all by the apache config shown in
the manpage:

               <LocationMatch "^/git/.*/git-receive-pack$">
                       AuthType Basic
                       AuthName "Git Access"
                       Require group committers
                       ...
               </LocationMatch>

which should not match on the info/refs request at all. That is why I
suspect there is something else wrong in your lighttpd config, or
something wrong in the conversion of the apache config to lighttpd.

Anyway, it sounds like you found a working config.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]