android source code下載源代碼時出錯

  android.git.kernel.org[0: 199.6.1.176]: errno=Connection timed out

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

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的源代碼了

 

normal:

[zhoudy@zdyhost linux]$ git clone git://android.git.kernel.org/kernel/common.git
Cloning into common...
remote: Counting objects: 1823867, done.
remote: Compressing objects: 100% (284389/284389), done.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章