We have port 9418 blocked here so I can’t seem to clone with git://xyz.git
Is there a way to make git use HTTP instead? If I do it manually it works but when I run git submodule update it always wants to use git:
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to change the configuration variable
submodule.<submodule-name>.urlfor each submodule, e.g.:Then when you do
git submodule update, thegit fetchwhich is run in that submodule will use the URL from that configuration variable.If you want to change
originin that submodule, you’ll need to take some separate steps:… but if you’re not actively working in that submodule, you don’t have to worry about that.
The
.gitmodulesfile is just used to set thesubmodule.<submodule-name>.urlvariable when you initialize the submodule. It’s not worth changing unless you want to push a new version of the.gitmodulesfile, and it’s good policy to make sure that URLs in the.gitmodulesfile are accessible to everyone who might clone it (e.g. typically you wouldn’t commit a.gitmodulesfile with SSH URLs.)