Home:ALL Converter>git - Can you clone via HTTPS even if SSH-style git@github is used

git - Can you clone via HTTPS even if SSH-style git@github is used

Ask Time:2021-03-09T04:46:10         Author:ColinKennedy

Json Formatter

I'm trying to clone a git repository which has submodules via git submodule update --init --recursive. These submodules all use "[email protected]:foo/bar.git" URLs. Unfortunately, my work place is preventing SSH URLs from their firewall. I can, however, clone via HTTPS, with no problems.

As mentioned, the submodule URLs are hard-coded in the repository to use SSH. Is there a way to tell git to clone these submodule repositories using HTTPS without instead of SSH making any direct modifications to the git repository?

Author:ColinKennedy,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/66536953/git-can-you-clone-via-https-even-if-ssh-style-gitgithub-is-used
yy