* Bug: git submodule update doesn't give a prompt to add pubkey of remote repo host, and failed because of it.
@ 2024-02-06 16:07 DingJunyao
0 siblings, 0 replies; only message in thread
From: DingJunyao @ 2024-02-06 16:07 UTC (permalink / raw)
To: git@vger.kernel.org
Git version: git version 2.43.0.windows.1
OS: Windows 11 22H2 (22621.3007)
(I don't know whether it's a Windows-specific bug)
I cloned a project from one remote repo (A), and the project has a submodule from the other remote repo (B). Both of them are connected to the remote repo of which by SSH, and I added my pubkey to both of the repo providers.
I executed the command in project directory:
git submodule init
git submodule update
When updating, the following error happened:
Cloning into '/path/to/submodule'...
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'user@host:repo/path.git' into submodule path '/path/to/submodule' failed
Failed to clone 'themes/anzhiyu-ding-mod'. Retry scheduled
Cloning into '/path/to/submodule'...
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'user@host:repo/path.git' into submodule path '/path/to/submodule' failed
Failed to clone 'path/to/submodule' a second time, aborting
I cloned another repo from B. When I did it, I found I hadn't added the pubkey of repo B to the list of known hosts before.
The authenticity of host 'host (XXX.XXX.XXX.XXX)' can't be established.
ED25519 key fingerprint is SHA256:XXXXXXXXXXXXX.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'host' (ED25519) to the list of known hosts.
After that, I tried to execute `git submodule update` in the previous project and succeeded.
I think when I update submodule and I haven't added the key to the submodule remote repo, it needs to give a prompt to add the public key, just like cloning.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-02-06 16:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-06 16:07 Bug: git submodule update doesn't give a prompt to add pubkey of remote repo host, and failed because of it DingJunyao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox