- 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
- My private is key is also on a USB stick
- set the
GNUPGHOMEto the directory on the stick to modify it
My fix of the error: gpg failed to sign the data error
- make sure the name set with
git config user.namematches 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