Skip to content

Instantly share code, notes, and snippets.

@silassare
Created September 20, 2022 18:21
Show Gist options
  • Save silassare/66358d2264fc79b088cf4f9dedfba8da to your computer and use it in GitHub Desktop.
Save silassare/66358d2264fc79b088cf4f9dedfba8da to your computer and use it in GitHub Desktop.
Host key verification failed. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

Using VS Code built in Git

When you get this error message:

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

Please make sure you have the correct access rights
and the repository exists.

Possible reason is that ~/.ssh/known_hosts file is empty or doesn't contain your repository host's fingerprint.

Solution

Open built in VS Code terminal

Make sure you are in your project root folder (where .git directory is)

$ git pull

You should have a prompt to which you answer: yes

DONE!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment