13

Is it possible to provide both https and ssh access to a git submodule?

Some people might prefer to use https and some might only be able to use ssh (e.g. because they are behind an ssh tunnel).

Is it possible to provide both options of fetching submodules?

1
  • In the doc there is a specific URL for each submodule, maybe creating an alias or a auxiliar script would do it. Can you do this ? Commented Sep 9, 2015 at 14:34

1 Answer 1

12

You can use relative URL when referencing a submodule.

For example if you have an application repository:

and a library repository:

then you can reference the library as ../lib/some-library.git instead of the full URL.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.