text 自动操作.gitmodules,以便Travis CI从公共URL而不是SSH URL中提取子模块。

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text 自动操作.gitmodules,以便Travis CI从公共URL而不是SSH URL中提取子模块。相关的知识,希望对你有一定的参考价值。

#
# I use SSH URLs in my submodules for convenience. However, Travis CI is unable to
# clone from those URLs even though the repositories are public. To fix this, I'm
# simply manipulating the .gitmodules file with sed so it points to the public
# URLs before initializing the submodules.
#
# Hope it saves you some frustration!
#

# disable the default submodule logic
git:
  submodules: false

# use sed to replace the SSH URL with the public URL, then init and update submodules
before_install:
  - sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules
  - git submodule update --init --recursive

以上是关于text 自动操作.gitmodules,以便Travis CI从公共URL而不是SSH URL中提取子模块。的主要内容,如果未能解决你的问题,请参考以下文章