Skip to content

Use https for submodule initialization #2324

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 7, 2016

Conversation

rosen-vladimirov
Copy link
Contributor

At the moment the submodule is initialized via ssh. This way the command git submodule update --init will work only for users who have write access to mobile-cli-lib.
This also requires custom logic when travis is used. In current implementation, travis automatically calls npm install before executing the scripts, but at this point the submodule is not initialized yet (as we have declared submodules variable to false).
So the npm install executed by travis, will fail in case the postinstall script uses some code from the submodule.
In order to fix this two changes are applied:

  • change the sumodule to be used over https instead of ssh.
  • modify .travis.yml to use submodule correctly and remove two manual steps which are executed by travis by default, there's no need the execute them again.

NOTE: In case you have two-factor authentication, you'll not be able to commit to mobile-cli-lib over https. In this case you have to:

  • remove content of lib/common dir
  • clone over ssh: $ git clone [email protected]:telerik/mobile-cli-lib.git . (you must be inside lib/common dir).

At the moment the submodule is initialized via ssh. This way the command `git submodule update --init` will work only for users who have write access to mobile-cli-lib.
This also requires custom logic when travis is used. In current implementation, travis automatically calls `npm install` before executing the scripts, but at this point the submodule is not initialized yet (as we have declared submodules variable to false).
So the `npm install` executed by travis, will fail in case the postinstall script uses some code from the submodule.
In order to fix this two changes are applied:
 - change the sumodule to be used over https instead of ssh.
 - modify .travis.yml to use submodule correctly and remove two manual steps which are executed by travis by default, there's no need the execute them again.

NOTE: In case you have two-factor authentication, you'll not be able to commit to mobile-cli-lib over https. In this case you have to:
 - remove content of lib/common dir
 - clone over ssh: `$ git clone [email protected]:telerik/mobile-cli-lib.git .` (you must be inside lib/common dir).
@rosen-vladimirov rosen-vladimirov added this to the 2.5.0 milestone Dec 7, 2016
@rosen-vladimirov rosen-vladimirov self-assigned this Dec 7, 2016
@dtopuzov
Copy link
Contributor

dtopuzov commented Dec 7, 2016

run ci

@rosen-vladimirov
Copy link
Contributor Author

Ping @ErjanGavalji

@rosen-vladimirov
Copy link
Contributor Author

run ci

@ErjanGavalji
Copy link
Contributor

Agreed, the dumb protocol of git has proven as the better option for submodules. That will be true until people learn caring about their security and using SSH :)

@rosen-vladimirov rosen-vladimirov merged commit fd73039 into master Dec 7, 2016
@rosen-vladimirov rosen-vladimirov deleted the vladimirov/travis-fix branch December 7, 2016 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants