I wanted to make GPG-signed commits directly in VSCode, so I tweaked the GPG settings in WSL.

When GPG signing is enabled in Git, you might encounter an error like git =gpg failed to sign the data vscode.

To resolve this, I set Git for Windows to trigger a GUI for entering the GPG passphrase. Additionally, I configured WSL to call Pinentry, making the process smoother.

$ vim ~/.gnupg/gpg-agent.conf
# Add the following line:
# pinentry-program "/mnt/c/Program Files (x86)/Gpg4win/bin/pinentry.exe"
# Return to the terminal:
$ gpg-connect-agent reloadagent /bye

With this configuration, a passphrase input GUI will appear when making commits in VSCode.