How to add SSH Private Key to Intellij for Git

Viewed 3144

When I use Git, I usually use the command line. so to push changes to the server. I add the public key to the SSH session using:

$ eval "$(ssh-agent -s)"
ssh-add "D:/Dev/Books Spaces/Version Control with Git and GitHub/SSH/key"
Enter passphrase for D:/Dev/Books Spaces/Version Control with Git and GitHub/SSH/key:
Identity added: D:/Dev/Books Spaces/Version Control with Git and GitHub/SSH/key (me*****d@outlook.com)

Now I would like to use intellij using SSH. How Can I add the private key to intellij? Right now it prints the message: enter image description here

1 Answers

Since you ssh key is not a standard one (in %USERPROFILE%\.ssh\id_rsa), you would need to make a %USERPROFILE%\.ssh\config file in order to reference said key

Host github
  Hostname github.com
  User git
  IdentityFile "D:/Dev/Books Spaces/Version Control with Git and GitHub/SSH/key"

Then try the origin remote URL github:xxxx/tacos01.git

Related