照source.android.com網站一步一步做,却出现了以下错误
git://android.git.kernel.org.............: errno=Connection refused
....
....
...
..
fatal: unable to connect a socket(connection refused)
Google了好久,才发现原因:是我所在的网络的firewall挡掉了git的TCP连接.
找到一个可以通过代理避开firewall的方法,但是却没有找到我所在的网络内的代理服务器,
结果无功而返,只能回家使用移动的宽带再试一下,旦愿移动宽带没有封git的TCP.
这里给需要的朋友提供Using git with sock proxy behind firewall 的方法:
http://blogs.gnome.org/juanje/2009/07/17/git_behind_proxy/
Using git behind a proxy This is a simple recipe about how to use git behind a proxy. Right now I’m working behind a very restrictive firewall and I can’t get any port I need open, so I use a proxy socks for working with git,bzr,jabber and so on. I was looking for an easy way to use git with a proxy but I didn’t find easily the solution. After some researches a friend (Roberto) found the solution and we use it at work. Let’s see it Just in case we don’t have it: $ mkdir ~/bin Now the interesting part, the wrapper for the proxy: $ cat <<EOF>> ~/bin/proxy-wrapper #!/bin/sh # Put your own values PROXY_IP=10.0.0.80 PROXY_PORT=22000 nc -x${PROXY_IP}:${PROXY_PORT} -X5 $* EOF $ chmod +x ~/bin/proxy-wrapper Note that you’ll need to have installed netcat (the openbsd’s one: netcat-openbsd) to be able to use the command nc with the option -x. Then you’ll have to be sure you have setted the ~/bin directory on your PATH and then add the env variable GIT_PROXY_COMMAND. That variable will be used by git for doing pushes through git or ssh protocol: $ cat <<EOF>> ~/.bashrc export PATH=~/bin:"${PATH}" export GIT_PROXY_COMMAND=~/bin/proxy-wrapper EOF Now you will be able to use git normally with no worries about the firewall, nat or whatever.
另外还有一个free proxy list的网址
http://tools.rosinstrument.com/cgi-bin/sps.pl?pattern=;(%5c%2b)|(1080;)&max=100&nskip=0&file=proxlog.csv