我有以下的
当我克隆仓库并运行
我注意到三件事情引起了一些担忧:
编辑:下面是我的 git 配置供参考:
.gitmodules
文件:[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
当我克隆仓库并运行
git submodule init && git submodule update
(或git submodule init --update
)时,我会出现以下错误: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
我注意到三件事情引起了一些担忧:
- 第二个
.gitmodules
条目(web/old)被克隆得很好,没有任何问题。 - 错误消息中似乎有一个额外的空格,在这里我认为 git 通常会列出它无法查找的主机名(在上面列出的错误之前列出端口号列表)。
git clone git://amygdala.servebeer.com:lucky_blog.git
运行得非常好。
编辑:下面是我的 git 配置供参考:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@amygdala.servebeer.com: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
.git/config
中与子模块相关的内容吗? - dmedvinsky