I have a git submodule:
$ cd zathura
$ git remote get-url origin
ssh://git@github.com/pwmt/zathura.git
$ cd ..
But inside .git/config
[submodule "zathura"]
url = https://github.com/pwmt/zathura.git
And inside .gitmodules
[submodule "zathura"]
path = zathura
url = https://github.com/pwmt/zathura.git
ignore = dirty
Why the Remote urls are inconsistent (a mixture of https and ssh)? Is this valid? Or is it due to some mistake that I might have done? How can I have consistent remote url and which url is used by git?
From the comments of Git Submodules equivalent for url.insteadof
, this should work:
git -c url.https://github.com/.insteadOf=git@github.com: submodule update --init --recursive
That way, you can test the effect of an insteadOf
directive, and make sure HTTPS is used everywhere.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.