repo init from behind a proxy server?

4,629 views
Skip to first unread message

Chris

unread,
Oct 21, 2008, 5:09:18 PM10/21/08
to Android Internals
Is anyone else having issues doing repo init -u git://android.kernel.org/platform/manifest.git
from behind a firewall?

Are there instructions for getting this to work with either an http or
socks proxy? I have tried assorted incantations involving http_proxy,
HTTP_PROXY, ~/.ssh/config, etc but have been unsuccessful to get it to
go thru a proxy instead of trying to connect directly.

Chris

unread,
Oct 21, 2008, 5:58:19 PM10/21/08
to Android Internals
Note that using details from http://threebytesfull.com/2008/04/git-with-and-without-proxy.html,
I was able to get the repo command to proceed from behind proxy. I
needed to (a) setup a "connect" script that goes to a socks proxy
(b) set environment variable GIT_PROXY_COMMAND to point to this
connect script

This is the first time that I have had to use GIT_PROXY_COMMAND
instead configuring my ~/.ssh/config settings. If anyone has
instructions for getting android repo to work that just need to modify
~/.ssh/config, I'd love to hear about it.

David Given

unread,
Oct 21, 2008, 6:17:55 PM10/21/08
to android-...@googlegroups.com
Chris wrote:
> Is anyone else having issues doing repo init -u git://android.kernel.org/platform/manifest.git
> from behind a firewall?

I have a firewall but no proxy, and I'm finding it's behaving really
oddly for me --- hanging, socket errors, etc.

My personal suspicion is that it's all horribly slashdotted from people
downloading the source --- git.webkit.org in particular seems to have
failed for me --- and I'll have another go tomorrow.

--
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────

│ ⍎'⎕',∊N⍴⊂S←'←⎕←(3=T)⋎M⋏2=T←⊃+/(V⌽"⊂M),(V⊝"M),(V,⌽V)⌽"(V,V←1⎺1)⊝"⊂M)'
│ --- Conway's Game Of Life, in one line of APL

signature.asc

Chris

unread,
Oct 21, 2008, 9:35:30 PM10/21/08
to Android Internals
I suspect that you are right and these external components and
associated git repositories are getting hammered. I have yet to see
success getting past the git.webkit.org stage of repo sync.
Hopefully, repo options will show up to allow it to proceed with other
downloads and/or retry on failure.

If "repo sync" is going to be a common operation, hammering on all of
these external repositories may be an ongoing problem.
>  signature.asc
> < 1KViewDownload

David Given

unread,
Oct 22, 2008, 10:20:34 AM10/22/08
to android-...@googlegroups.com
Chris wrote:
> I suspect that you are right and these external components and
> associated git repositories are getting hammered. I have yet to see
> success getting past the git.webkit.org stage of repo sync.
> Hopefully, repo options will show up to allow it to proceed with other
> downloads and/or retry on failure.

I've finally managed to get a copy of the source; git.webkit.org was
back up, but repo sync would die every couple of minutes, but I just
kept repeating it until it worked. However, I don't have the necessary
tools to build it yet, so I don't know if it's complete.

--
David Given
d...@cowlark.com

Chris

unread,
Oct 22, 2008, 10:48:02 AM10/22/08
to Android Internals
David Given wrote:
> I've finally managed to get a copy of the source; git.webkit.org was
> back up, but repo sync would die every couple of minutes, but I just
> kept repeating it until it worked. However, I don't have the necessary
> tools to build it yet, so I don't know if it's complete.

The webkit problem got resolved for me when the team switched over to
mirrors for some external components (see http://source.android.com/known-issues).

From in front of the proxy, I got lucky and had a totally clean "repo
sync" from in front of the proxy with no socket errors late last
night. From behind a proxy, I was able to sync successfully sometime
last night with a "repo sync" in a loop with a 60 second backoff until
it succeeded. I was definately seeing random socket errors too.
Hopefully it will get better with updates to the servers, repo tool,
and after the initial hammering of downloads completes...

Now on to trying to build...

kapare

unread,
Oct 22, 2008, 2:03:22 PM10/22/08
to Android Internals
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, 10:48 am, Chris <chris.l.elf...@intel.com> wrote:
> David Given wrote:
> > I've finally managed to get a copy of the source;git.webkit.org was
> > back up, but repo sync would die every couple of minutes, but I just
> > kept repeating it until it worked.   However, I don't have the necessary
> > tools to build it yet, so I don't know if it's complete.
>
> The webkit problem got resolved for me when the team switched over to
> mirrors for some external components (seehttp://source.android.com/known-issues).
>
> From in front of theproxy, I got lucky and had a totally clean "repo
> sync" from in front of theproxywith no socket errors late last
> night.  From behind aproxy, I was able to sync successfully sometime
> last night with a "repo sync" in a loop with a 60 second backoff until
> it succeeded.   I was definately seeing random socket errors too.
> Hopefully it will get better with updates to the servers, repo tool,
> and after the initial hammering of downloads completes...
>
> Now on to trying to build...
>
> David Given wrote:
> > Chris wrote:
> > > I suspect that you are right and these external components and
> > > associatedgitrepositories are getting hammered.  I have yet to see
> > > success getting past thegit.webkit.org stage of repo sync.

Dexterhello

unread,
Oct 27, 2008, 5:48:14 AM10/27/08
to Android Internals
i got the similar issues:

====================================================
warning: no common commits
remote: Counting objects: 89, done.
remote: Compressing objects: 100% (78/78), done.
Unpacking objects: 13% (12/89)
====================================================

i tried
http://threebytesfull.com/2008/04/git-with-and-without-proxy.html
and transconnect
http://sourceforge.net/project/showfiles.php?group_id=21209&package_id=14909&release_id=74704

Neither works for me.


On Oct 23, 2:03 am, kapare <kevyn.alexandre.p...@gmail.com> wrote:
> 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 cntlmhttp://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 SOCKSproxyusing 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 -ugit://android.git.kernel.org/platform/manifest.git
> Getting repo ...
>    fromgit://android.kernel.org/tools/repo.git
Reply all
Reply to author
Forward
0 new messages