I am currently developing code on a remote server by using Visual Studio Code's remote SSH feature to remotely edit code using VSCode that is running on my local machine. Local machine is on Mac OS X Catalina 10.15.5, while the remote server is running Ubuntu 20.02 inside WSL2.
When I try to create a regular commit in VSCode, it works as expected. However, when I try to autosign the commit, the following error appears after clicking on the "commit" button in VSCode:
Git: gpg failed to sign the data
In order to create a signed commit remotely, I had to run the following in the VSCode terminal:
git commit -S -m "my commit msg"
which brings up the full screen UI in the terminal
┌────────────────────────────────────────────────────────────────┐
│ Please enter the passphrase to unlock the OpenPGP secret key: │
│ "Nyxynyx <my-email@gmail.com>" │
│ 4096-bit RSA key, ID B22A24D512345678, │
│ created 2001-01-08. │
│ │
│ │
│ Passphrase: ****************__________________________________ │
│ │
│ <OK> <Cancel> │
└────────────────────────────────────────────────────────────────┘
Entering the correct passphrase allowed the commit to be signed.
Question: Is there a way to create a signed commit using only VSCode UI and without using the terminal?