Friday, October 24, 2008

repo the android opensource via proxy

If you are using proxy, you will get error when run: "repo init -u git://android.git.kernel.org/platform/manifest.git".
Here is a tip to repo via proxy.
To use GIT behind a proxy, have a look at:
http://www.aptgetupdate.de/2007/07/27/git-hinterm-proxy-nutzen/

Basically the steps are:
1 - sudo apt-get install socket
2 - in your home directory, put a shell script called "proxy-cmd.sh"
containing (replace YOUR_PROXY and YOUR_PROXY_PORT with your own proxy
parameters):
#! /bin/bash
(echo "CONNECT $1:$2 HTTP/1.0"; echo; cat ) | socket YOUR_PROXY
YOUR_PROXY_PORT | (read a; read a; cat )
3 - chmod +x proxy-cmd.sh
4 - export GIT_PROXY_COMMAND=/proxy-cmd.sh

4 comments:

dilipm79 said...

Where are we giving the proxy passwd?

rtm said...

If you are saying the proxy need username/password authorization, you may give Proxy-Authorization: Basic base64_encode(username:password). Not sure if it will work, but try like this: (echo "CONNECT $1:$2 HTTP/1.0"; echo "Proxy-Authorization: Basic base64-string"; echo; cat) | socket proxy port | (read a; read a; cat)
Replace base64-string with base64 of string "username:password".
As you can see, here socket is used to create a http connection tunnel.

Unknown said...

Does nc work instead of socket ?

Unknown said...

You do not need to pay back considerably for ones outfit to appear wonderful.
We offer wedding dresses, bridesmaid dresses, beach wedding dresses,my friends welcome to visit and see!
wedding dresses