threads / discuss / 9347

core.gitproxy and non-git protocols

Subject: core.gitproxy and non-git protocols

## tl;dr

5 messages between Aug 2, 2007 and Aug 4, 2007.

replies: 4people: 3as markdown or json

David Symonds· Aug 2, 2007, 05:21 UTC · lore
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.
Shawn O. Pearce· Aug 2, 2007, 05:31 UTC · re: David Symonds · lore

Re: core.gitproxy and non-git protocols

David Symonds <dsymonds@gmail.com> 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.
Jakub Narebski· Aug 4, 2007, 00:34 UTC · re: Shawn O. Pearce · lore

Re: core.gitproxy and non-git protocols

Shawn O. Pearce wrote:
> David Symonds <dsymonds@gmail.com> wrote:
Show 6 quoted lines
>> 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
Shawn O. Pearce· Aug 4, 2007, 05:43 UTC · re: Jakub Narebski · lore

Re: core.gitproxy and non-git protocols

Jakub Narebski <jnareb@gmail.com> wrote:
Show 7 quoted lines
> Shawn O. Pearce wrote:
> > 
> > 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.
Jakub Narebski· Aug 4, 2007, 00:33 UTC · re: David Symonds · lore

Re: core.gitproxy and non-git protocols

[Cc: David Symonds <dsymonds@gmail.com>, gmane.comp.version-control.git]
David Symonds wrote:
Show 5 quoted lines
> 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

← back to recent threads