From: Nguyen Thai Ngoc Duy Date: Sat, 01 Oct 2011 04:27:01 GMT Subject: Re: [PATCH] transport: do not allow to push over git:// protocol Message-ID: In-Reply-To: <20111001022544.GA31036@LK-Perkele-VI.localdomain> 2011/10/1 Ilari Liusvaara : > What about sticking code to return an error to git daemon instead of this? > > Here's what happens if I try to push to one of repos on this computer > over git://: > > $ git push git://localhost/foobar > fatal: remote error: W access for foobar DENIED to anonymous > > So send-pack can deal with ERR packet (and yes, that error message > is really from Gitolite). I'm dealing with git.gnome.org and not sure what's the server behind. I had a look at git-daemon and it does allow push, but disabled by default. So yes, maybe updating git-daemon is better. > Aside: git archive seemingly can't deal with ERR packets. And worse > yet, it doesn't even print what it received, resulting this: > > $ git archive --remote=git://localhost/foobar HEAD > fatal: git archive: protocol error Yes, builtin/archive.c seems only recognize either ACK or NACK. pack-protocol.txt does not mention about ERR either, which seems to be introduced in a807328 (connect.c: add a way for git-daemon to pass an error back to client). -- Duy