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).

  • Getting error in Openshift while pushing my app
  • git: rename local branch failed
  • IntelliJ error: branch 'origin/HEAD' does not point at a commit, some refs could not be read
  • How do I get COMMIT_EDITMSG to open from the correct location?
  • How to modify existing, unpushed commits?
  • How to tell ANT-exec, the location of git executable
  • Is it possible to provide both options of fetching submodules?

  • Change root of a branch in git
  • How to add files to another branch?
  • SourceTree can't push to Bitbucket
  • Sharing a repo without git-daemon
  • How do you download a specific release of Android source code (e.g. Android 2.2)
  • Use of an exclamation mark in a Git commit message via command line?
  • One Solution collect form web for “Git Submodules: It is possible to provide both https and ssh access to submodules?”

    You can use relative URL when referencing a submodule.

    For example if you have an application repository:

    • git@example.org:project/app.git
    • or http://example.org/git/project/app.git

    and a library repository:

    • git@example.org:lib/some-library.git
    • or http://example.org/git/lib/some-library.git,

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

    Git Baby is a git and github fan, let's start git clone.