$ curl https://android.git.kernel.org/repo > ~/bin/repo
curl: (6) Couldn't resolve host 'android.git.kernel.org'
原因是因為android.git.kernel.org網站被黑了,是以無法從該網站下載下傳repo和android源代碼了。
是以我們隻能想辦法從其他地方下載下傳了.
我們可以從https://www.codeaurora.org/網站下載下傳android源碼。
具體方法如下:
下載下傳repo并設定環境變量
$ curl "http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo"> ~/bin/repo
$ chmod a+x ~/bin/repo
$ PATH=~/bin:$PATH
下載下傳android源碼
$ mkdir WORKING_DIRECTORY
$cd WORKING_DIRECTORY
$ repo init -u git://codeaurora.org/platform/manifest.git -b gingerbread
$ repo sync
PS: repo隻是一個腳本工具。你可以從任何地方下載下傳repo工具,例如
http://code.google.com/p/git-repo/
但是如何要下載下傳android源代碼的話,需要把repo檔案打開,把檔案開頭的
REPO_URL='git://android.git.kernel.org/tools/repo.git'
的這個位址換成其他可以下載下傳源代碼的位址久可以了,上面下載下傳的repo就是把
REPO_URL='git://android.git.kernel.org/tools/repo.git'
替換成
REPO_URL='git://codeaurora.org/tools/repo.git'