gnzlbg
gnzlbg

Reputation: 7415

Git Submodules: It is possible to provide both https and ssh access to submodules?

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

Answers (1)

Josef Kufner
Josef Kufner

Reputation: 2989

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.

Upvotes: 12

Related Questions