我有一个远程服务器(example.com),它同时承载Apache和Git。通过ssh引用本地存储库的更新子模块
在我的本地开发机器上,我从example.com克隆了Repository_A,将Repository_B(也在host.com上托管)作为Repository_A的子模块添加并推回。
子模块路径是ssh://[email protected]:/var/git/themes/Repository_B.git
。
在接下来的一步中,我想将Repository_A克隆到服务器的webroot中。我做的:
git clone /var/git/sites/Repository_A.git
git submodule init
git submodule update
并得到以下错误:
Cloning into sites/all/themes/Repository_B...
ssh: Could not resolve hostname example.com:: Name or service not known
fatal: The remote end hung up unexpectedly
Clone of 'ssh://[email protected]:/var/git/themes/Repository_B.git' into submodule path 'sites/all/themes/Repository_B' failed
不过,我可以从example.com ssh到example.com没有任何问题。
我该如何解决这个问题?
一个额外的冒号:SSH://[email protected]:在/ var /的git /主题/ Repository_B。主机名后的git – user3159253 2014-11-21 19:41:41
它应该是ssh://[email protected]/var/git/themes/Repository_B – user3159253 2014-11-21 19:42:25
这个作品,谢谢!想知道downvote顺便说一句。 – haggis 2014-11-24 09:57:04