# core.gitproxy and non-git protocols

5 messages from 2007-08-02 to 2007-08-04. Participants: David Symonds, Shawn O. Pearce, Jakub Narebski.
Thread: https://gitlist.dev/t/9347

## David Symonds, 2007-08-02 05:21

Subject: core.gitproxy and non-git protocols
Message-ID: <ee77f5c20708012221j4d75ff0dl8fbf16cdaf1401bd@mail.gmail.com>
URL: https://gitlist.dev/e/ee77f5c20708012221j4d75ff0dl8fbf16cdaf1401bd%40mail.gmail.com

```
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, 2007-08-02 05:31

Subject: Re: core.gitproxy and non-git protocols
Message-ID: <20070802053151.GH20052@spearce.org>
URL: https://gitlist.dev/e/20070802053151.GH20052%40spearce.org
In-Reply-To: <ee77f5c20708012221j4d75ff0dl8fbf16cdaf1401bd@mail.gmail.com>

```
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, 2007-08-04 00:33

Subject: Re: core.gitproxy and non-git protocols
Message-ID: <f90hhb$3tg$1@sea.gmane.org>
URL: https://gitlist.dev/e/f90hhb%243tg%241%40sea.gmane.org
In-Reply-To: <ee77f5c20708012221j4d75ff0dl8fbf16cdaf1401bd@mail.gmail.com>

```
[Cc: David Symonds <dsymonds@gmail.com>, 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

```

## Jakub Narebski, 2007-08-04 00:34

Subject: Re: core.gitproxy and non-git protocols
Message-ID: <f90his$3tg$2@sea.gmane.org>
URL: https://gitlist.dev/e/f90his%243tg%242%40sea.gmane.org
In-Reply-To: <20070802053151.GH20052@spearce.org>

```
Shawn O. Pearce wrote:

> 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...

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, 2007-08-04 05:43

Subject: Re: core.gitproxy and non-git protocols
Message-ID: <20070804054329.GO20052@spearce.org>
URL: https://gitlist.dev/e/20070804054329.GO20052%40spearce.org
In-Reply-To: <f90his$3tg$2@sea.gmane.org>

```
Jakub Narebski <jnareb@gmail.com> wrote:
> 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.

```
