你得到这个错误是因为你通过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