core.gitproxy and non-git protocols

5 messages, 3 authors, 2016-06-15 · open the first message on its own page

core.gitproxy and non-git protocols

From: David Symonds <hidden>
Date: 2016-06-15 22:43:25

Hi,

The part of the git-config documentation that covers core. gitproxy is
incorrect: you can't use the core.gitproxy setting to use a proxy
command for ssh://, nor to create your own faux-protocols. In the
git_connect function (connect.c), it only references git_proxy_connect
(and thus the core.gitproxy setting) if (protocol == PROTO_GIT).

I have a situation where I'd like to push to a remote git repository
on a machine that is a little weird to access, so I need two different
types of ssh'ing to reach it depending on my location. That is easily
scriptable, which is how I did it with SVN (ended up with a
svn+voltron:// protocol), but is not currently possible with git.

It'd be great if (a) the documentation could be fixed, or (b) the
proxy-picking code could be at least extended to ssh:// protocols, and
preferrably extended to defining custom protocols.

Thanks,

Dave.

Re: core.gitproxy and non-git protocols

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:43:25

David Symonds [off-list ref] wrote:
It'd be great if (a) the documentation could be fixed, or (b) the
proxy-picking code could be at least extended to ssh:// protocols, and
preferrably extended to defining custom protocols.
Did you try setting GIT_SSH envvar to point to a script that does
what you need?  I do this in one particular case...

-- 
Shawn.

Re: core.gitproxy and non-git protocols

From: Jakub Narebski <hidden>
Date: 2016-06-15 22:43:26

[Cc: David Symonds [off-list ref], gmane.comp.version-control.git]

David Symonds wrote:
I have a situation where I'd like to push to a remote git repository
on a machine that is a little weird to access, so I need two different
types of ssh'ing to reach it depending on my location. That is easily
scriptable, which is how I did it with SVN (ended up with a
svn+voltron:// protocol), but is not currently possible with git.
See http://git.or.cz/gitwiki/GitTip, section "How to push/pull via ssh to
host behind gateway?". It describes two solutions: first, using
ProxyCommand option of ssh and netcat utility on gateway, second via ssh
tunnel set up.

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

Re: core.gitproxy and non-git protocols

From: Jakub Narebski <hidden>
Date: 2016-06-15 22:43:26

Shawn O. Pearce wrote:
David Symonds [off-list ref] wrote:
quoted
It'd be great if (a) the documentation could be fixed, or (b) the
proxy-picking code could be at least extended to ssh:// protocols, and
preferrably extended to defining custom protocols.
Did you try setting GIT_SSH envvar to point to a script that does
what you need?  I do this in one particular case...
GIT_SSH environmental variable is *not described* anywhere in the
documentation. Would you be so kind?

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

Re: core.gitproxy and non-git protocols

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:43:26

Jakub Narebski [off-list ref] wrote:
Shawn O. Pearce wrote:
quoted
Did you try setting GIT_SSH envvar to point to a script that does
what you need?  I do this in one particular case...
GIT_SSH environmental variable is *not described* anywhere in the
documentation. Would you be so kind?
Whow.  It really isn't documented.

OK, I'll send a documentation patch in a few minutes.

-- 
Shawn.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help