5

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*****[email protected])

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 Answer 1

7

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

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks that worked. do you have a link to article on this I would like to read more on this.
@usertest Great! I remember using that back in 2012 (stackoverflow.com/a/12066973/6309). All the parameters of an SSH config file are described in ssh.com/ssh/config. Examples: cyberciti.biz/faq/create-ssh-config-file-on-linux-unix

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.