I installed GPG4Win and Kleopatra on my Windows 10 system, and imported my public and private key files that were created on another machine. My goal is to sign my commits in Github using these keys (which I've done in the past from the old machine). After I import the keys, I run this command in the Windows command line or Powershell, and it shows the keys:
C:\Users\michael>gpg --list-keys
C:\Users\michael\AppData\Roaming\gnupg\pubring.kbx
---------------------------------------------
pub rsa4096 2020-01-14 [SC]
<snipped the fingerprint>
uid [ultimate] Michael (Github) <[email protected]>
sub rsa4096 2020-01-14 [E]
However, when I run these commands in git bash (restarting git bash after the first one), nothing is displayed:
$ git config --global gpg.program "C:\Program Files (x86)\GnuPG\bin\gpg.exe"
$ gpg --list-secret-keys
$ gpg --list-keys
Why do the keys show up in the Windows command line, but not git bash (even after setting the GPG program correctly)? My guess is that it's still something to do with the path but I thought setting the global git setting would fix that.