Skip to content

Instantly share code, notes, and snippets.

@mec
Last active July 26, 2019 10:47
Show Gist options
  • Select an option

  • Save mec/5e84e330d650c2fb61368db1da0a7c8a to your computer and use it in GitHub Desktop.

Select an option

Save mec/5e84e330d650c2fb61368db1da0a7c8a to your computer and use it in GitHub Desktop.
Yubikey notes

Add Yubkikey GPG to a machine

  • My yubikey GPG key is on Keybase.io so this imports it locally:

curl https://keybase.io/mecrawlings/key.asc | gpg --import

  • Once I have the key locally I need to trust it:

gpg --edit-key <keyid>

trust then option 5 ultimate trust

Using my backup

  • My private is key is also on a USB stick
  • set the GNUPGHOME to the directory on the stick to modify it

Signing git commits

The dreaded error: gpg failed to sign the data

My fix of the error: gpg failed to sign the data error

  • make sure the name set with git config user.name matches the key ID exactly otherwise it will not work!
  • list the key ids with gpg --list-secret-keys
  • check both email address and name
  • check the same values are in the git config either globally or locally to the repo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment