Re: [PATCH] transport: do not allow to push over git:// protocol
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Oct 1, 2011, 04:27 UTC
- Message-ID
- <CACsJy8DVBVpDMgT7e1Mx70eUOznhifQHWR+zwg-=qPQMkzNRQA@mail.gmail.com>
- In-Reply-To
- <20111001022544.GA31036@LK-Perkele-VI.localdomain>
2011/10/1 Ilari Liusvaara <ilari.liusvaara@elisanet.fi>:
Show 10 quoted lines
> 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.
Show 5 quoted lines
> 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