Closed hdrab127 closed 1 year ago
If it helps, I also have my .ssh/config file set up with
Host gitlab.com
HostName gitlab.com
IdentityFile C:/Users/hdrab/.ssh/id_ed25519
But maybe that's getting ignored or overruled somewhere. Adding this to C:/Program Files/Git/etc/ssh/ssh_config appears to have fixed the issue above permanently
This is probably a consequence of the RStudio shell hooks, which we use to try and ensure that an appropriate version of Python is placed on the PATH. It can be disabled here (Tools -> Global Options... -> Terminal -> General):
Thanks! That fixes it without the ssh_config settings
System details
Steps to reproduce the problem
This might be hard to reproduce sorry. After updating to 2022.12, I started getting git permission denied (publickey) errors. So I checked ssh and it looks like the new RStudio version might have altered the default ssh key directory to
'/c/Program Files/RStudio/resources/app/resources/terminal/bash/.ssh'
?I definitely don't know my way around git or windows though, so I'm really sorry if this is a me issue rather something in RStudio.
This same behaviour occured after adding a new ssh key from the Create SSH Key button in RStudio "Tools/Global Options/Git-SVN/SSH key:".
Also, it doesn't matter if using git bash by itself, or the intergrated terminal in RStudio with git bash.
Describe the problem in detail
A quick fix (https://stackoverflow.com/questions/71563841/how-to-fix-ssh-git-connections-after-windows-update-broke-them-issue-seems-to) was to add my previous ssh key manually and everything worked again:
But this needs to be run for each new terminal session. I copied my .ssh folder to
/c/Program Files/RStudio/resources/app/resources/terminal/bash/
and gave that folder write access, which seemed to fix the ssh call but not git pull or push permission oddly.I also tried re-installing RStudio 2022.12 into my home directory (instead of program files) to avoid write issues but this only allowed the creation of the
/c/Users/hdrab/RStudio/resources/app/resources/terminal/bash/.ssh/known_hosts
file. It didn't fix the git ssh connection.Finally, I reverted to RStudio 2022.07.2-576 and could not reproduce the issue there. Git and ssh worked as expected again. I then updated back to 2022.12 and received the same issues as above. So I guess some internal configuration is changed when installing 2022.12?
Describe the behavior you expected
Git & ssh to continue working as it did before updating RStudio. Or the Create SSH Key UI in RStudio to create the new key in the RStudio terminal/bash/ directory maybe.
Apologies again if this is something to do with my system setup!