TODO: talk about TTLs (apparently doesn't apply with yk with pins,
according to [drduh](https://github.com/drduh/YubiKey-Guide#create-configuration))
If you are running a version before GnuPG 2.1 (and you really
shouldn't), you will also need:
use-standard-socket
default-cache-ttl 60
max-cache-ttl 120
Then you can restart `gpg-agent` with:
gpgconf --kill gpg-agent
gpgconf --launch gpg-agent
If you're on a Mac, you'll also need:
pinentry-program /usr/local/bin/pinentry-mac
In GNOME, there's a [keyring agent](https://wiki.gnome.org/Projects/GnomeKeyring) which also [includes an SSH
agent](https://wiki.gnome.org/Projects/GnomeKeyring/Ssh), see [this guide for how to turn it off](https://gist.github.com/artizirk/d09ce3570021b0f65469cb450bee5e29#permanent).
At this point, SSH should be able to see the key:
ssh-add -L
If not, make sure `SSH_AUTH_SOCK` is pointing at the GnuPG agent.
### exporting SSH public key from GnuPG
### Exporting SSH public keys from GnuPG
Newer GnuPG has this:
gpg --export-ssh-key $FINGERPRINT
In older, you can also use:
You can also use the more idiomatic:
ssh-add -L
### preliminary performance evaluation
... assuming the key has been used at least once.
### Signed Git commit messages
To sign Git commits with OpenPGP, you can use the following configuration:
git config --global user.signingkey $FINGERPRINT
git config --global commit.gpgsign true
Git should be able to find GnuPG and will transparently use the
YubiKey to sign commits
### Preliminary performance evaluation
Preparation:
...
...
@@ -855,7 +922,7 @@ configuration. An acceptable compromise, perhaps.
### Troubleshooting
If an opreation fails, check if GnuPG can see the card with:
If an operation fails, check if GnuPG can see the card with:
gpg --card-status
...
...
@@ -893,6 +960,11 @@ can completely wipe the OpenPGP applet with:
WARNING: that will WIPE all the keys on the device, make sure you have
a backup or that the keys are revoked!
If GnuPG doesn't pop up a dialog prompting you for a password, you
might have an incorrect `TTY` variable. Try to kick `gpg-agent` with:
gpg-connect-agent updatestartuptty /bye
See also [drduh's troubleshooting guide](https://github.com/drduh/YubiKey-Guide#troubleshooting).