Search code examples
gitintellij-ideasshmacos-sierra

Can't use ssh git repositories after SierraOS update


I updated my macbook to latest Sierra OS with all security updates. Since then my Intellij can't operate with remote git repositories using ssh. It works (fetch, pull, push) when using https version of remote repository. Git also works on terminal with ssh repositories or https repositories. In Intellij settings, I tried to switch Native or Built-in executable and tests says it works fine.

But when I try to pull changes from [email protected]:company/repo.git in Intellij it doesn't work and says Could not read from remote repository


Solution

  • Your private is key is probably locked. Try inputting this into a terminal window to unlock it:

    ssh-add -K

    Not sure if that will permeate through to IntelliJ though, otherwise try to unlock your private key from within IntelliJ. I don't use IntelliJ, so I am not familiar with how to do it there.