IT notes

gpg: selecting card failed: Operation not supported by device

If using a yubikey and getting this: gpg: selecting card failed: Operation not supported by device gpg: OpenPGP card not available: Operation not supported by device Add to ~/.gnupg/scdaemon.conf disable-ccid To debug you could use: reader-port Yubico Yubi debug-all debug-level guru disable-ccid log-file /tmp/scd.log

gpg

Install gpg on macOS: brew install gnupg pinentry-mac if required restart gpg-agent with gpgconf --kill gpg-agent To create a gpg key in batch mode, create a file named gpg-key-script with this value: Key-Type: 1 Key-Length: 2048 Subkey-Type: 1 Subkey-Length: 2048 Name-Real: your name Name-Comment: your comment Name-Email: [email protected] Expire-Date: 0 Next you could do something like: $ gpg --homedir /salt/gpgkeys --batch --gen-key gen-key-script Backup private key To save the private key to a file: