Git and proxy HOW TO?

2,022 views
Skip to first unread message

kapare

unread,
Oct 22, 2008, 11:49:32 AM10/22/08
to android-platform
I made search on the web but didn't found a proper solution do you
have won? I'm using

/etc/init.d/cntlmd

Thx

kapare

unread,
Oct 22, 2008, 12:09:22 PM10/22/08
to android-platform
[kapare@p11634 mydroid]$ repo init -u git://android.git.kernel.org/platform/manifest.git
Getting repo ...
from git://android.kernel.org/tools/repo.git
android.kernel.org[0: 204.152.191.45]: errno=Connection timed out

kapare

unread,
Oct 22, 2008, 12:31:18 PM10/22/08
to android-platform
I try last post didnt work: because I dont' have /bin/socket. I will
need to try this one: http://threebytesfull.com/2008/04/git-with-and-without-proxy.html

FIRST TRY:::::::

http://groups.google.com/group/fa.linux.kernel/browse_thread/thread/2155bdd213258f7a/e65c263fad46df5d?lnk=st&q=Git+proxy#e65c263fad46df5d

FROM POST:::
export GIT_PROXY_COMMAND=/usr/local/bin/proxy-cmd.sh

and proxy-cmd.sh is just single-line command glued from what I found
available in /bin:

#! /bin/bash

(echo "CONNECT $1:$2 HTTP/1.0"; echo; cat ) | socket
proxy.ourcompany.com 3128 | (read a; read a; cat )

RESULTS:::::::::
[kapare@p11634 mydroid]$ repo init -u git://android.git.kernel.org/platform/manifest.git
Getting repo ...
from git://android.kernel.org/tools/repo.git
/usr/local/bin/proxy-cmd.sh: line 3: socket: command not found
cat: write error: Broken pipe
/usr/local/bin/proxy-cmd.sh: line 4: 127.0.0.1: command not found
fatal: The remote end hung up unexpectedly
[kapare@p11634 mydroid]$

kapare

unread,
Oct 22, 2008, 1:54:36 PM10/22/08
to android-platform
http://threebytesfull.com/2008/04/git-with-and-without-proxy.html
Question about that post?

I'm not able to make it work :(

I'm using cntlm http://cntlm.awk.cz/

Can you help me to understand what I'm missing!

I think the problem is in relation with my understanding of
my.socks.server:1080 ?? What should I but there?

thx

[kapare@p11634 mydroid]$ cat /usr/local/bin/socks-gw
#!/bin/sh
# Filename: ~/bin/socks-gw
# This script connects to a SOCKS proxy using connect.c
/usr/local/bin/connect -S localhost:1080 $@

[kapare@p11634 mydroid]$ cat /usr/local/bin/socks-ssh
#!/bin/sh
# Filename: ~/bin/socks-ssh
# This script opens an SSH connection through a SOCKS server
ssh -o ProxyCommand="/usr/local/bin/socks-gw %h %p" $@

[kapare@p11634 mydroid]$ $http_proxy
bash: http://127.0.0.1:3128: No such file or directory
[kapare@p11634 mydroid]$ ls $GIT_SSH
/usr/local/bin/socks-ssh
[kapare@p11634 mydroid]$ ls $GIT_PROXY_COMMAND
/usr/local/bin/socks-gw

[kapare@p11634 mydroid]$ repo init -u git://android.git.kernel.org/platform/manifest.git
Getting repo ...
from git://android.kernel.org/tools/repo.git
ERROR: Got error response from SOCKS server: 1 (general SOCKS server
failure).
FATAL: failed to begin relaying via SOCKS.
fatal: The remote end hung up unexpectedly
[kapare@p11634 mydroid]$

On Oct 22, 12:31 pm, kapare <kevyn.alexandre.p...@gmail.com> wrote:
> I try last post didnt work: because I dont' have /bin/socket. I will
> need to try this one:http://threebytesfull.com/2008/04/git-with-and-without-proxy.html
>
> FIRST TRY:::::::
>
> http://groups.google.com/group/fa.linux.kernel/browse_thread/thread/2...

Chris

unread,
Oct 22, 2008, 2:42:40 PM10/22/08
to android-platform
Hi Kevyn,

We were discussing this at http://groups.google.com/group/android-internals/browse_thread/thread/db82b1c4f1ba8c83

my GIT_PROXY_COMMAND points to a script that looks like this

#!/bin/sh
/usr/bin/connect -S proxyxxx.yyy.zzz.com:1080 $@

Note: /usr/bin/connect is provided by the package connect-proxy on
debian/ubuntu.

Note that i also needed to set my http_proxy because some stuff
downloads via wget and need that proxy instead of a SOCKS proxy.

Good luck

Chris

unread,
Oct 22, 2008, 2:46:41 PM10/22/08
to android-platform
Note that I am currently not setting GIT_SSH.

On Oct 22, 11:42 am, Chris <chris.l.elf...@intel.com> wrote:
> Hi Kevyn,
>
>  We were discussing this athttp://groups.google.com/group/android-internals/browse_thread/thread...
Message has been deleted

kapare

unread,
Oct 22, 2008, 4:18:51 PM10/22/08
to android-platform
So I try but again didn't work. I think that this will not work for me
because::
#!/bin/sh
/usr/bin/connect -S proxy:1080 $@

This require that my proxy give access to 1080 and it only gives
access to 80 so I also try::::

#!/bin/sh
/usr/bin/connect -S proxy:80 $@

But again no success I'm on Fedora 8, is there a solution to do
something like this:
repo init -u http://android.git.kernel.org/platform/manifest.git

THX!

OUTPUT::::::::::::
[kapare@p11634 mydroid]$ repo init -u git://android.git.kernel.org/platform/manifest.git
Getting repo ...
from git://android.kernel.org/tools/repo.git
FATAL: Unable to connect to relay host, errno=110
fatal: The remote end hung up unexpectedly
[kapare@p11634 mydroid]$
[kapare@p11634 mydroid]$ links www.google.com
[kapare@p11634 mydroid]$
[kapare@p11634 mydroid]$ $http_proxy
bash: http://127.0.0.1:3128: No such file or directory
[kapare@p11634 mydroid]$ ls $GIT_PROXY_COMMAND
/usr/local/bin/socks-gw
[kapare@p11634 mydroid]$ ls $GIT_SSH
[kapare@p11634 mydroid]$ cat /usr/local/bin/socks-gw
#!/bin/sh
# Filename: ~/bin/socks-gw
# This script connects to a SOCKS proxy using connect.c
/usr/local/bin/connect -S proxy:1080 $@

[kapare@p11634 mydroid]$

#### CHANGING /usr/local/bin/connect -S proxy:80 $@
[kapare@p11634 mydroid]$ repo init -u git://android.git.kernel.org/platform/manifest.git
Getting repo ...
from git://android.kernel.org/tools/repo.git
FATAL: atomic_in() failed to recv(), 104
fatal: The remote end hung up unexpectedly
[kapare@p11634 mydroid]$

Chris

unread,
Oct 22, 2008, 4:50:44 PM10/22/08
to android-platform
Kevyn writes:
> This require that my proxy give access to 1080 and it only gives
> access to 80 so I also try::::

Ah... It sounds like you have access to an HTTP proxy but not a SOCKS
proxy. The connect instructions and the instructions at
http://threebytesfull.com/2008/04/git-with-and-without-proxy.html are
intended for SOCKS proxies. Unfortunately, I do not know of a way to
git via an HTTP proxy.

kapare

unread,
Oct 22, 2008, 6:16:40 PM10/22/08
to android-platform
AAAAAAAAAA! ;)

Thx I will change the direction of my search! And search a way to git
via HTTP proxy

kap

On Oct 22, 4:50 pm, Chris <chris.l.elf...@intel.com> wrote:
> Kevyn writes:
> > This require that my proxy give access to 1080 and it only gives
> > access to 80 so I also try::::
>
> Ah...  It sounds like you have access to an HTTP proxy but not a SOCKS
> proxy.   The connect instructions and the instructions athttp://threebytesfull.com/2008/04/git-with-and-without-proxy.html are

Chris

unread,
Oct 22, 2008, 7:03:35 PM10/22/08
to android-platform
googling a bit (git http proxy) yielded this that might have
potential...

http://lkml.org/lkml/2006/2/26/207... http://transconnect.sourceforge.net/

Because I have access to SOCKS proxies I haven't had to go this far.
Best of luck.

kapare

unread,
Oct 22, 2008, 9:49:43 PM10/22/08
to android-platform
Thx I'm working on getting transconnect to work. I did make and
terminate with a error.....

But Now I'm at Home without HTTP proxy and I have been able to compile
it (transconnect). I will try this tomorrow!

For now I'm farther than before, I'm at Building the code and have
that issue:
http://groups.google.com/group/android-platform/browse_thread/thread/3660c2ac60a305b0

I will update if transconnect work!

Thx for the help

kap

On Oct 22, 7:03 pm, Chris <chris.l.elf...@intel.com> wrote:
> googling a bit (git http proxy) yielded this that might have
> potential...
>
> http://lkml.org/lkml/2006/2/26/207...http://transconnect.sourceforge.net/
Reply all
Reply to author
Forward
0 new messages