Re: [PATCH] transport: do not allow to push over git:// protocol
- From
- Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
- Date
- Oct 1, 2011, 02:25 UTC
- Message-ID
- <20111001022544.GA31036@LK-Perkele-VI.localdomain>
- In-Reply-To
- <1317432415-9459-1-git-send-email-pclouds@gmail.com>
On Sat, Oct 01, 2011 at 11:26:55AM +1000, Nguyễn Thái Ngọc Duy wrote:
Show 9 quoted lines
> This protocol has never been designed for pushing. Attempts to push > over git:// usually result in > > fatal: The remote end hung up unexpectedly > > That message does not really point out the reason. With this patch, we get > > error: this protocol does not support pushing > error: failed to push some refs to 'git://some-host.com/my/repo'
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).
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
-Ilari