gpg signing works fine outside of RStudio, but not in the RStudio terminal

I'm on Windows 10 using RStudio 2022.12.0 Build 353 "Elsbeth Geranium" with Git version Since I updated to this version of RStudio, I've been having a lot of problems with the terminal in general but now I can't seem to sign my commits. When I use git bash outside of RStudio, I don't have this problem.

Both terminals (standalone git bash and the terminal inside of RStudio) appear to be using the same git executable and the same gpg executable. However, like I said, when I try to sign commits in the standalone git bash it works as expected. But when I try to sign commits in the terminal in RStudio I get a "no secret key" error.

That would be fine if I could just generate a new key, but whenever I run gpg --full-generate-key in RStudio, it goes through all the setup steps and then when it's time to actually generate the key I get this series of errors:

gpg: can't connect to the agent: IPC connect call failed
gpg: agent_genkey failed: No agent running
Key generation failed: No agent running

I tried some random commands I found on StackOverflow, namely gpg-connect-agent reloadagent /bye and gpg-connect-agent -v but both gave me an error about not being able to connect.

This problem is completely new to this version of RStudio for me, and I'm not really sure what to try. It hasn't impacted my ability to do work cause everything in standalone git bash still works exactly the same, but it is a little bit annoying. Does anyone have any suggestions? Thanks!

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.