Host key validation failed - GitLab with Visual Studio Code on macOS
3 answers
Solved by removing any / all Known_hosts files in ~ / .ssh / and then executing ssh git@gitlab.com
in Terminal and answering yes (which re-adds git@gitlab.com to known_hosts after recreating the new known_hosts file).
I played around with known_hosts, which is probably what caused the problem.
+11
source to share
I found that my home profile was loading as "P: \" in git bash (due to my IT team work ...).
Make sure that in git bash you have generated the ssh key using ssh-keygen
, and that GitLab knows about the key.
If the problem ssh -o StrictHostKeyChecking=no <gitlab-host> uptime
persists , run to make gitlab trusted.
0
source to share