How to set up git SSH keys?

I've got remote repository on Bitbucket. It seems that my IDE can't see the path to my SSH keys. In my git config I've got following line:

"puttykeyfile = E:\\...\\hg-bitbucket.ppk"

My SSH executable in phpStorm is set to "built-in". When I try to push something to the remote branch I receive information: "10:44    Push failed: Failed with error: Could not read from remote repository."

In my IDE settings in "Bitbucket" section there is button "Add SSH keys" however it doesn't work. There is no action when I click on it. I changed SSH executable into "native" and it's still doesn't work.

What should I do?




BitBucket integration is a 3rd party plugin. We unfortunately do not provide integration with BitBucket out of the box.

I haven't also found any information if "puttykeyfile" config setting is correctly read by IDE. So I would suggest testing this with a standard setup ( and id_rsa files in your user_home\.ssh directory)


I don't use any 3rd party plugin only build-in VCS. I click close task with: commit, merge settings checked, then I press ctrl + shift + K (push) and I receive message shown in my first post. So I can't push to remote branch without 3rd party plugin?

I tried to put rsa files into basic ssh directory, but it didn't work. I use pageant to store my passwords, because my private key is encrypted, however it still doesn't work. I also changed GIT settings to Native.

I found a solution here:

However I already done these steps (I'm using Pageant and SSH native) and my PhpStorm still can't push anything.



Just to be sure, when you perform git push via Terminal, it doesn't ask you for the passphrase, does it?


When I checked it in terminal I received extra information that my public key has got invalid format. It works under tortoiseGit and Pageant, however it seems that native git wants another format. All in all it's not IDE issue, so thank you for paying attention.


Please sign in to leave a comment.