threads / bug / 53764

bug

Subject: bug

## tl;dr

2 messages between Jun 26, 2020 and Jun 29, 2020.

replies: 1people: 2as markdown or json

Luke Knoble· Jun 26, 2020, 21:11 UTC · lore
Howdy,
I've found an issue in which I'm using this command:
git clone --recurse-submodules ssh://git@someurl:9999/someproject/repoX.git

git clones the repo successfully if I dont pass “git clone” any flags, but gives me this error when I use “--recurse-submodules” and git attempts to clone a single submodule:

git@someurl: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. fatal: clone of 'ssh://git@someurl:9999/someproject/submodule_repo.git' into submodule path 'C:/someproject/submodule_repo' failed

The obvious answer is that my permissions are bad, but I can clone the submodule repo directly without issue.. This command succeeds:

git clone --recurse-submodules ssh://git@someurl:9999/someproject/submodule_repo.git

what gives git?
Philippe Blain· Jun 29, 2020, 18:08 UTC · re: Luke Knoble · lore

Re: [BUG] SSH permission error doing `git clone --recurse-submodules <SSH url>` (was: "bug")

Hi Luke,
Show 7 quoted lines
> Le 26 juin 2020 à 17:11, Luke Knoble <lupeknoble@gmail.com> a écrit :
> 
> Howdy,
> 
> I've found an issue in which I'm using this command:
> 
> git clone --recurse-submodules ssh://git@someurl:9999/someproject/repoX.git
Which version of Git ?
> 
> git clones the repo successfully if I dont pass “git clone” any flags,

Does `git submodules update --init` then works ? Can you share `.gitmodules` ? (is the submodules recorded with an HTTP or SSH url in `.gitmodules` ?)

Show 16 quoted lines
> but gives me this error when I use “--recurse-submodules” and git
> attempts to clone a single submodule:
> 
> git@someurl: Permission denied (publickey).
> fatal: Could not read from remote repository.
> Please make sure you have the correct access rights
> and the repository exists.
> fatal: clone of
> 'ssh://git@someurl:9999/someproject/submodule_repo.git' into submodule
> path 'C:/someproject/submodule_repo' failed
> 
> The obvious answer is that my permissions are bad, but I can clone the
> submodule repo directly without issue.. This command succeeds:
> 
> git clone --recurse-submodules
> ssh://git@someurl:9999/someproject/submodule_repo.git
Interesting. Could you retry your commands, prefixing them with `GIT_TRACE2=1 GIT_SSH_COMMAND="ssh -vvv"` ?
Philippe.

← back to recent threads