change ssh key used by Rstudio

How does one change the ssh key used by Rstudio to connect to git? In Tools > Global Options > Git/SVN there is an option to Create SSH Key..., but there's no option to change to an already existing SSH key.

I've already changed my .ssh/config file. Git for Windows uses the correct ssh key and I can use git on the same directory that RStudio is failing on, but Rstudio insists on using an old key that won't connect.

Hi, Can you just delete the key off the file system and then restart RStudio? That worked for me in clearing this field:

I removed the old key from my .ssh directory, and then Rstudio automatically switched to listing the correct ssh key under the settings. Unless Rstudio checked the .ssh/config file, I'm not sure how it decided which ssh key to pick. But regardless, it still won't connect. When I use the terminal in Rstudio for git commands, it still asks for my password (and doesn't accept my password if I do enter it). And when I add the old key back to my .ssh directory, RStudio reverts back to it automatically. Removing all the keys from my .ssh directory does work to clear the field, but even then the only option is to create a new key, not use a pre-existing key.

  1. Replace the existing key with a new one in the ~/.ssh/ directory.
  2. Add the new key using "Create SSH Key..." in RStudio's Git/SVN settings.
    Regards:
    [Duck Names ]

So there's no way to use a pre-existing key that's already set up and working with github? I have to create a special one for RStudio? (And then optionally replace my existing key with the one I create for RStudio.)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.