你得到這個錯誤是因爲你通過ssh-urls指定了子模塊。對於travis-ci環境下的ssh訪問,您需要configure a key。
另外,你可以使用相對的URL爲你的git子模塊,因爲你的項目和你的子模塊都在Github上可用。
Git針對ORIGIN
解析相關網址。
例子:
使用從.gitmodules
第2項:
[submodule "lib/es5-shim"]
path = lib/es5-shim
url = [email protected]:kriskowal/es5-shim.git
[submodule "build/html"]
path = build/html
url = [email protected]:quadroid/clonejs.git
替換爲相對URL:
[submodule "lib/es5-shim"]
path = lib/es5-shim
url = ../../kriskowal/es5-shim.git
[submodule "build/html"]
path = build/html
url = ../clonejs.git
然後,當克隆 - 說 - 通過HTTPS原點設置像這樣:
$ git clone https://github.com/quadroid/clonejs.git
$ cd clonejs
$ git remote -v
origin https://github.com/quadroid/clonejs.git (fetch)
origin https://github.com/quadroid/clonejs.git (push)
當通過SSH克隆:
$ git clone [email protected]:quadroid/clonejs.git
$ cd clonejs
$ git remote -v
origin [email protected]:quadroid/clonejs.git (fetch)
origin [email protected]:quadroid/clonejs.git (push)
相對URL,通常的子模塊順序獨立工作的由來:
$ git submodule init
$ git submodule update
通過更改子模塊的網址,以固定的git://github.com/quadroid/clonejs.git 但現在我不能在本地推動這個模塊... – Quadroid 2013-03-28 05:06:34
使用[部署鍵(HTTPS:/ /help.github.com/categories/30/articles),或讓腳本只在travis中更改URL,而不是在本地 – 2013-03-28 11:05:14