gitclonessh-keysrsa-key-fingerprint

git clone error - The authenticity of host can't be established


Having problems cloning git repository to a new pc.

On the new pc, I ran ssh_keygen as follows

ssh-keygen -t rsa -C "laptop"

And I copied it to the clipboard using:

cat ~/.ssh/id_rsa.pub > /dev/clipboard

Than I went to gitlab profile settings and added a ssh key.
When I try to clone from intellij I get

clone failed. Could not read from remote repository

When I run from cli git clone using

git clone git@mygitlab:myproj/myproj.git 

I get

The authenticity of host 'ilgitlab (10.10.0.158)' can't be established.

The initial clone succeeds when i choose 'yes' but the integration with Intellij doesn't behave well.

I am working with a vpn (cisco anyconnect).


Solution

  • The yes if for the first clone to add the key to the know hosts, you should do the first one manually and the second one and on should pass without any problems,

    It should be a message like this one:

    enter image description here