Reputation: 7415
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?
Upvotes: 13
Views: 2082
Reputation: 2989
You can use relative URL when referencing a submodule.
For example if you have an application repository:
[email protected]:project/app.git
http://example.org/git/project/app.git
and a library repository:
[email protected]:lib/some-library.git
http://example.org/git/lib/some-library.git
,then you can reference the library as ../lib/some-library.git
instead of the full URL.
Upvotes: 12