-
-
Save petrbel/c3bf7e0f59c22a52f534 to your computer and use it in GitHub Desktop.
Travis-CI submodules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use https (public access) instead of git for git-submodules. This modifies only Travis-CI behavior! | |
# 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/[email protected]:/https:\/\/github.com\//' .gitmodules | |
- git submodule update --init --recursive |
Hi @kytwb, it is a long time since I comment to this .travis.yml
. I was a stubborn boy back then and didn't give any context when I put a comment.
It is a long time since I use submodules, I didn't have the answer.
No worries, genuinely curious. I had to implement that hack as well on one of my opensource repository.
I think I remember
use sed to replace the SSH URL with the public URL, then init and update submodules
before_install: - sed -i 's/[email protected]:/https:\/\/github.com\//' .gitmodules - git submodule update --init --recursive
I think I advice the author of this gist to directly using https instead of replacing it from git url to https url. GitHub has deploy key that you can use for individual repository to do some hack for the CI. Then I guess you can leverage Travis encryption to have the key committed to the repository safely on the public. Hope it helps.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@empeje but then you force every collaborator on the project to authenticate with username/password when checking out the submodules, no?