Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 07-19-2011, 02:07 AM   #1
LQ Newbie
Registered: Jul 2011
Distribution: Ubuntu 11.04
Posts: 8

Rep: Reputation: Disabled
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,


Last edited by jimbochou; 07-19-2011 at 02:09 AM.
Old 07-19-2011, 10:08 PM   #2
LQ Newbie
Registered: Jul 2011
Distribution: Ubuntu 11.04
Posts: 8

Original Poster
Rep: Reputation: Disabled
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.
Old 10-03-2014, 04:24 AM   #3
richard chang
LQ Newbie
Registered: Oct 2014
Posts: 1

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is Android Open Source or not? jlinkels Linux - Mobile 10 05-29-2011 09:50 AM
Building from source on Android - Where to start? Jinouchi Linux - Software 1 12-01-2010 11:18 AM
Authenticate ntlm proxy with cntlm and patch pam_cntlm Felipe Linux - Networking 0 05-21-2010 04:47 AM
LXer: Is the Android truly open source? LXer Syndicated Linux News 1 05-06-2010 08:19 AM
LXer: Android 2.0 source code now available LXer Syndicated Linux News 0 11-17-2009 12:41 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:05 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration