下載下傳Google的Android作業系統的時候卡在下面一步:
Getting repo ...
from git://android.git.kernel.org/tools/repo.git
android.git.kernel.org[0: 204.152.191.45]: errno=Connection timed out
android.git.kernel.org[0: 130.239.17.12]: errno=Connection timed out
android.git.kernel.org[0: 149.20.20.141]: errno=Connection timed out
android.git.kernel.org[0: 199.6.1.176]: errno=Connection timed out
fatal: unable to connect a socket (Connection timed out)
找各種原因,可能是公司用的區域網路ISP将Git的端口9418給封了,因為http://android.git.kernel.org是可以通路的。後來搜了一下知道很多git伺服器同時提供端口80的下載下傳。解決方法如下:
1.将指令行中的git://android.git.kernel.org換成http://android.git.kernel.org,
2.修改檔案repo将裡面的
REPO_URL='git://android.git.kernel.org/tools/repo.git' 改成
REPO_URL='http://android.git.kernel.org/tools/repo.git'
3. 修改檔案.repo/manifests/default.xml将其中的 fetch="git://android.git.kernel.org/" 改成
fetch="http://android.git.kernel.org/"
這樣就可以下載下傳同步Android的源代碼了