我需要将一个子模块从 gerrit 服务器克隆到我的本地项目。这是一个有效的 .gitmodule 文件:
[submodule "blah/blah/thing"]
path = blah/blah/thing
url = ssh://my_username@gerrit.somewhere.com/some-thing.git
这是我想要使用的 .gitmodule 文件,因为它适用于其他团队成员:
[submodule "blah/blah/thing"]
path = blah/blah/thing
url = gerrit.somewhere.com:some-thing.git
当我尝试使用后一种形式时,我收到此错误:
$ git submodule update --init --recursive
Submodule 'blah/blah/thing' (gerrit.somewhere.com:some-thing.git) registered for path 'blah/blah/thing'
Cloning into 'blah/blah/thing'...
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Clone of 'gerrit.somewhere.com:some-thing.git' into submodule path 'blah/blah/thing' failed
怎么了?