Why is git submodule update failing?
You have the format of your git URLs slightly wrong - you should separate the host from the path with /
rather than :
. Try changing the URLs to:
git://amygdala.servebeer.com/lucky_blog.git
git://amygdala.servebeer.com/old_lucky.git
You will not only need to commit those changes to .gitmodules
, but also change the config with:
$ git config submodule.web/blog.url git://amygdala.servebeer.com/lucky_blog.git
$ git config submodule.web/old.url git://amygdala.servebeer.com/old_blog.git
... and to make sure that the submodules are re-cloned, remove them and try the git submodule update
again.
Related videos on Youtube
Octaflop
Just another cognitive science student looking for another comp-sci resource.
Updated on June 04, 2022Comments
-
Octaflop almost 2 years
I have the following
.gitmodules
file:[submodule "web/blog"] path = web/blog url = git://amygdala.servebeer.com:lucky_blog.git [submodule "web/old"] path = web/old url = git://amygdala.servebeer.com:old_lucky.git
When I clone the repo and run
git submodule init && git submodule update
(orgit submodule init --update
) I get the following error:Cloning into web/blog... fatal: Unable to look up (port 9418) (Name or service not known) Clone of 'git://amygdala.servebeer.com:lucky_blog.git' into submodule path 'web/blog' failed
I observe three things which cause some concern:
- The second
.gitmodules
entry (web/old) is cloned just fine, with no issues. - There appears to be an extra space in the error message, where I think git would normally list the hostname it fails to look up (right before the port number listing in the error listed above).
git clone git://amygdala.servebeer.com:lucky_blog.git
works just fine.
What is wrong with this repo? Is this an error with git or did I screw something up when setting up the repo?
Edit Here's my git config for reference:
[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true [remote "origin"] fetch = +refs/heads/*:refs/remotes/origin/* url = [email protected]:luckybead.git [branch "master"] remote = origin merge = refs/heads/master [submodule "web/blog"] url = git://amygdala.servebeer.com:lucky_blog.git [submodule "web/old"] url = git://amygdala.servebeer.com:old_lucky.git
- The second