GPG sign git commits on Windows - Fix

I saw the following error while attempting to sign a commit in Git Bash:

gpg: detected reader `Yubico Yubikey 4 OTP+U2F+CCID 0'
gpg: pcsc_transmit failed: invalid parameter (0x80100004)
gpg: apdu_send_simple(0) failed: invalid value
Please insert the card and hit return or enter 'c' to cancel:

I fixed it by adding the GnuPG path to the beginning of the bash path:

$ export PATH=/c/Program\ Files\ \(x86\)/GnuPG/bin/:$PATH
Previous Next