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
(or git 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:
.gitmodules
entry (web/old) is cloned just fine, with no issues.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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With