IntelliJ 2019.1.3 - Can't access git using SSH keys
Answered
I'm trying to clone a git project from bitbucket using SSH keys. Project pulled as expected when using Git cli or Eclipse git plugin, but I can't figure out how to do that using IntelliJ. The project url is ssh://baraktheking@bitbucket.org/company/affiliation.git (VCS -> checkout from version control -> Git), the error I get is:
baraktheking@bitbucket.org: Permission denied (publickey). Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
Where should I configure the ssh keys in the IDE so it will identify them? The git settings screen looks like this:
Thanks for any help.
Please sign in to leave a comment.
Solved - had to edit C:\Program Files\Git\etc\ssh\ssh_config with the details:
Host bitbucket.org
IdentityFile C:\Users\User\Dropbox\work\baraktheking_bitbucket_key
I'm connecting to a Linux box with private key SSH authentication (not bitbucket).
This in ssh_config works in Windows when "id_rsa" file is in C:\Users\myname\.ssh\
https://stackoverflow.com/a/61133519/2141309