LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Getting Android source behind a proxy using cntlm (https://www.linuxquestions.org/questions/linux-software-2/getting-android-source-behind-a-proxy-using-cntlm-892427/)

jimbochou 07-19-2011 02:07 AM

Getting Android source behind a proxy using cntlm
 
Hi,

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 http://source.android.com/source/downloading.html

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://android.git.kernel.org/tools/repo.git
android.git.kernel.org[0: 130.239.17.13]: errno=No route to host
android.git.kernel.org[0: 149.20.4.77]: errno=No route to host
android.git.kernel.org[0: 149.20.20.141]: errno=No route to host
android.git.kernel.org[0: 199.6.1.173]: errno=No route to host
android.git.kernel.org[0: 2001:4f8:1:10:1972:112:1:0]: errno=Network is unreachable
android.git.kernel.org[0: 2001:4f8:8:10:1972:112:1:0]: errno=Network is unreachable
android.git.kernel.org[0: 2001:500:60:10:1972:112:1:0]: errno=Network is unreachable
android.git.kernel.org[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 http://android.git.kernel.org/platform/manifest.git then I get as far as -

Getting repo ...
from http://android.git.kernel.org/tools/repo.git
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.
From http://android.git.kernel.org/tools/repo
* [new branch] maint -> origin/maint
* [new branch] master -> origin/master
* [new branch] stable -> origin/stable
* [new tag] v1.7.5 -> v1.7.5
From http://android.git.kernel.org/tools/repo
* [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 ...
from http://android.git.kernel.org/platform/manifest.git
error: RPC failed; result=22, HTTP code = 407
fatal: The remote end hung up unexpectedly
fatal: cannot obtain manifest http://android.git.kernel.org/platform/manifest.git


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

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.