I need to clone a submodule from the gerrit server into my local project. Here is the .gitmodule file that works:
[submodule "blah/blah/thing"] path = blah/blah/thing url = ssh:// my_username@gerrit.somewhere.com /some-thing.git
Here is the .gitmodule file that I would like to work because it works for other team members:
[submodule "blah/blah/thing"] path = blah/blah/thing url = gerrit.somewhere.com:some-thing.git
When I try to use the latter form, I get this error:
$ 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
What's wrong?
source share