Home > database >  Clone gitlab repository Host key verification failed. fatal: Could not read from remote repository
Clone gitlab repository Host key verification failed. fatal: Could not read from remote repository

Time:05-22

I'm trying to clone a repository using visual studio but this message shows up

Host key verification failed.
fatal: Could not read from remote repository.

I've already created an ssh key and copied the pub key

 ssh-keygen
 cat /c/Users/Toshiba/.ssh/id_rsa.pub

and added it to my gitlab account when I try to cloneit fromt git bash I get

The authenticity of host 'gitlab.com (2606:4700:90:0:f22e:fbec:5bed:a9b9)' can't be established.
ED25519 key fingerprint is SHA256:eUXGGm1YGsMAS7vkcx6JOJdOGHPem5gQp4taiCfCLB8.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])?

What should I do?

CodePudding user response:

Typing yes is one thing. But it is sensible to check first if the fingerprint proposed is indeed the one of the remote GitLab server.

The ones for gitlab.com are shown here.
Since what you see (SHA256:eUXGGm1YGsMAS7vkcx6JOJdOGHPem5gQp4taiCfCLB8) matches one of those, you can type yes, and update your own c/Users/Toshiba/.ssh/known_hosts file.

There is a proposal (issue 25142) to expose those fingerprints on the server side, implemented with MR 13850 (and commit f913f7a) in GitLab 10.2 (Nov. 2017).

  • Related