Thread (20 messages) flat view 20 messages, 7 authors, 2016-06-15

Re: [PATCH] transport: do not allow to push over git:// protocol

From: Nguyen Thai Ngoc Duy <hidden>
Date: 2016-06-15 22:52:09

2011/10/1 Ilari Liusvaara [off-list ref]:
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help