When using pycharm in Ubuntu, I got an error associated id_rsa. I was clear that this error must be caused by my settings on the shsh keys. In this ubuntu, I have generated muliple ssh private/public key paris before, this makes the pycharm version control frustrated.
Up till now, pycharm itself does not support several keys. However, a plugin called intellij-plugins can help save the key and passphrase information. For you information, you can see the stackoverflow discussion here
Here, I will show you how to solve this problem using the .ssh/config file.
To make it clear, I genereate a new ssh key pair:
In [ ]:
ssh-keygen -t rsa -b 4096 -C "fyuewen@hotmail.com"
I named the private key file to be 'id_rsa_pycharm-git', corerspondingly it's public key would be 'id_rsa_pycharm-git.pub'.
In [ ]:
ssh-add ~/.ssh/id_rsa_pycharm-git
In [ ]:
ssh-add -l # to ensure the key is added
open ~/.ssh/config and revise it:
Host github-fyuewen HostName github.com User git IdentityFile ~/.ssh/id_rsa_pycharm-git.pub
Got to you github, and add the public key in the settings.
start a new terminal, lauch your pycharm in the terminal. Go the settings->version contrl-> git, set the git excutable to 'native'. This step is very import.
Now you can have a try with 'git push'.
In [ ]: