Search code examples
visual-studio-codegitlabmacos-sierra

Host Key Verification Failed - GitLab with Visual Studio Code on macOS


I keep getting a "Host Key Verification Failed" error when trying to push changes to a git controlled folder/project to Gitlab. For whatever reason, it works fine using Visual Studio for Mac, and I can login to my Gitlab account just fine via web browser.


Solution

  • Resolved by deleting any/all Known_hosts files in ~/.ssh/ and then executing ssh [email protected] in Terminal and answering "yes" (which re-adds [email protected] to known_hosts after re-creating a new known_hosts file).

    I did some messing around in known_hosts which probably caused the problem.