Re: [PATCH] transport: do not allow to push over git:// protocol
- From
Jeff King <peff@peff.net>
- Date
- Oct 3, 2011, 07:42 UTC
- Message-ID
- <20111003074250.GB9455@sigill.intra.peff.net>
- In-Reply-To
- <1317432415-9459-1-git-send-email-pclouds@gmail.com>
On Sat, Oct 01, 2011 at 11:26:55AM +1000, Nguyen Thai Ngoc 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'
I thought pushing over git:// _is_ supported. It's just that most servers don't have it turned on, for the obvious lack-of-authentication reasons.
See 4b3b1e1 (git-push through git protocol, 2007-01-21), and the discussion here:
http://thread.gmane.org/gmane.comp.version-control.git/37325
Your patch shuts it off at the client level, so even with it turned on for the server, the client can never get to it.
I still think push-over-git:// is a bit insane, and especially now with smart-http, you'd be crazy to run it. And in that sense, I wouldn't mind seeing it deprecated. But just shutting it off without a deprecation period seems unnecessarily harsh.
The real problem here seems to be that instead of communicating "no, we don't support that", git-daemon just hangs up. It would be a much nicer fix if we could change that. I'm not sure it's possible, though. There's not much room in the beginning of the room to make that communication in a way that's backwards compatible.
-Peff