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://".
Here is a tip to repo via proxy.
To use GIT behind a proxy, have a look at:

Basically the steps are:
1 - sudo apt-get install socket
2 - in your home directory, put a shell script called ""
containing (replace YOUR_PROXY and YOUR_PROXY_PORT with your own proxy
#! /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
4 - export GIT_PROXY_COMMAND=/


dil. 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.

naseer said...

Does nc work instead of socket ?

sasha said...

The Team Android phenomenon is spreading like wildfire. Lots of people are turning to the openness and diversity of Android smartphones when choosing a mobile device.
best android apps

best iphone apps

Pop Neo 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