I just went through setting up signed commits, in my case using a keybase GPG key. With a few additional configuration steps, it works well with RStudio.
Set your git global config to sign commits using your default key
gpg-agent --daemon
# if it prints a message that gpg-agent is already running...
kill-all gpg-agent
gpg-agent --daemon
At this point, any git commit will automatically be signed using your default key. The first commit of the day will require you to enter your password, which does mean that the RStudio Git UI won't be able to sign the first commit unless you've asked gpg to sign something for you.
To get around this, you can unlock your gpg key by signing anything at the start of your work day or whenever the 8 hour time limit runs out.
See rstudio issue 1865
https://grrrck.notion.site/keybase-gpg-setup-commit-signing-35333d2eb5e9492fa69846a9184fd587
I just went through setting up signed commits, in my case using a keybase GPG key. With a few additional configuration steps, it works well with RStudio.
Set your
git
global config to sign commits using your default keyConfigure
gpg
to use an agent for providing your password to unlock your key (I also set the default key here to make life easier)Configure
gpg-agent
to remember your key's password for the day (8 hours or 28,800 seconds)You may need to restart
gpg-agent
at this point.At this point, any
git commit
will automatically be signed using your default key. The first commit of the day will require you to enter your password, which does mean that the RStudio Git UI won't be able to sign the first commit unless you've askedgpg
to sign something for you.To get around this, you can unlock your gpg key by signing anything at the start of your work day or whenever the 8 hour time limit runs out.