Joel Becker [off-list ref] writes:
Can we teach the git:// fetch program to use CONNECT over HTTP
proxies? rsync can do this, but git:// cannot, so firewalls that block
9418 mean we use rsync://
I'm mostly offline this week or I'd take a stab at it.
It's been there for quite some time, although I never liked the
way it interfaces with the outside world.
$ cat .git/config
[core]
repositoryformatversion = 0
filemode = true
gitproxy = /usr/local/bin/tn-gw-nav-local
$ cat /usr/local/bin/tn-gw-nav-local
#!/bin/sh
# Use squid running at localhost
exec tn-gw-nav -H -h 127.0.0.1 -p 3128 "$1" "$2"
$ grep SSL /etc/squid/squid.conf
acl SSL_ports 443 563 9418 # https snntp git
http_access deny CONNECT !SSL_ports
$ git fetch --tags git://git.kernel.org/pub/scm/git/git.git/
It is a bit inconvenient that "git clone" wrapper cannot be used
on an existing repository, and without an existing repository
you cannot have .git/config. You could have the config file in
your site-wide template area, but admittably it is a bit
awkward.
On Mon, Jan 09, 2006 at 09:57:40PM -0800, Junio C Hamano wrote:
Joel Becker [off-list ref] writes:
quoted
Can we teach the git:// fetch program to use CONNECT over HTTP
proxies? rsync can do this, but git:// cannot, so firewalls that block
9418 mean we use rsync://
I'm mostly offline this week or I'd take a stab at it.
It's been there for quite some time, although I never liked the
way it interfaces with the outside world.
Ugly snipped...
It is a bit inconvenient that "git clone" wrapper cannot be used
on an existing repository, and without an existing repository
you cannot have .git/config. You could have the config file in
your site-wide template area, but admittably it is a bit
awkward.
Here's what I did. I modified the usual
ssh-tunnel-over-SSL-CONNECT script to honor http_proxy. I've attached
it. With this, I do as so:
# cp git-tunnel.pl /usr/local/bin
# export http_proxy="http://my-proxy.my.com:80/"
# GIT_PROXY_COMMAND="/usr/local/bin/git-tunnel.pl" git clone git://git.kernel.org/pub/scm/... localsource
# cd localsource
# vi .git/config
[core]
gitproxy = /usr/local/bin/git-tunnel.pl
This is working for me. I'd really rather have the tunneling
code be part of connect.c, and have core.proxymethod=external use the
current core.gitproxy method and core.proxymethod=http use $http_proxy.
But this will suffice for now :-)
Joel
--
Life's Little Instruction Book #198
"Feed a stranger's expired parking meter."
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127
On Mon, Jan 09, 2006 at 10:32:47PM -0800, Joel Becker wrote:
Here's what I did. I modified the usual
ssh-tunnel-over-SSL-CONNECT script to honor http_proxy. I've attached
it. With this, I do as so:
Bug in the script closing one side of the connection. Corrected
version attached.
Joel
--
"I'm drifting and drifting
Just like a ship out on the sea.
Cause I ain't got nobody, baby,
In this world to care for me."
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127