-   Linux - Software (
-   -   Getting Android source behind a proxy using cntlm (

jimbochou 07-19-2011 02:07 AM

Getting Android source behind a proxy using cntlm

I'm having a headache with my company's Windows environment and limited IT support. I've managed to get to a point where I'm using cntlm to authenticate myself with the proxy server and can browse normal websites.

Now I need to pull the Android source using git as written at

Now, the curl command works fine, I can pull the repo utility from the server. However, it is the actual repo part of the command that I am having trouble with.

I suspect the proxy server is blocking the git port of 9418 because if I run the instructions exactly as listed, I get -

Getting repo ...
from git://[0:]: errno=No route to host[0:]: errno=No route to host[0:]: errno=No route to host[0:]: errno=No route to host[0: 2001:4f8:1:10:1972:112:1:0]: errno=Network is unreachable[0: 2001:4f8:8:10:1972:112:1:0]: errno=Network is unreachable[0: 2001:500:60:10:1972:112:1:0]: errno=Network is unreachable[0: 2001:6b0:e:4017:1972:112:1:0]: errno=Network is unreachable
fatal: unable to connect a socket (Network is unreachable)

However, if I change the repo script to use http instead of git and I execute repo init -u then I get as far as -

Getting repo ...
remote: Counting objects: 1302, done.
remote: Compressing objects: 100% (569/569), done.
remote: Total 1302 (delta 838), reused 1140 (delta 710)
Receiving objects: 100% (1302/1302), 356.66 KiB | 110 KiB/s, done.
Resolving deltas: 100% (838/838), done.
* [new branch] maint -> origin/maint
* [new branch] master -> origin/master
* [new branch] stable -> origin/stable
* [new tag] v1.7.5 -> v1.7.5
* [new tag] v1.0 -> v1.0
* [new tag] v1.0.1 -> v1.0.1
* [new tag] v1.0.2 -> v1.0.2
* [new tag] v1.7.4.2 -> v1.7.4.2
* [new tag] v1.7.4.3 -> v1.7.4.3
Getting manifest ...
error: RPC failed; result=22, HTTP code = 407
fatal: The remote end hung up unexpectedly
fatal: cannot obtain manifest

Now to my understanding, HTTP code 407 means authentication required. cntlm must be working to some extent otherwise I wouldn't get as far as browsing website, etc.

Any clues to this?

Thanks in advance,


jimbochou 07-19-2011 10:08 PM

After going down several routes, to get the repo init command to work all I needed to do we passing in the proxy password and username directly by setting git's global configuration parameters. After that I changed the manifest.xml file to use http instead of git and now it's downloading the source.

Seems that some of my solution uses cntlm for authentication and some will use just the standard proxy username and password passing mechanism.

richard chang 10-03-2014 04:24 AM

Good day, jimbochou:
I have the same problem. Could you show me the detail settings about git?

All times are GMT -5. The time now is 04:53 AM.