

Gpg2 -export-secret-keys -armor -output myfile export public key (same command above except -export arg) GnuPG needs to construct a user ID to identify your key.Ĭhange (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O Please specify how long the key should be valid.

My requirements is to create the keys in a remote server thru SSH connection. To clarify, if you WANT pinentry to prompt you to enter your password anytime you're doing something that you want to verify with your PGP keys, make sure you don't have the options to remember your password enabled AND make sure you delete any PGP passwords you might have stored in macOS keychain.ĮDIT: found a similar answer on Ask Different: How to use GUI pinentry program for GPG Hope this might help anyone in the future who runs into this problem! It took me a couple months after I updated gpg and accidentally enabled these options before figuring out how to revert them back just now. I tried most other things mentioned on this thread, including adding export GPG_TTY=$(tty) to ~/.bash_profile, using gpg -no-use-agent (got the deprecated message, but still didn't work), looking at the ~/.gnupg/nf and ~/.gnupg/gpg.conf files (neither one really had anything that looked like it would change anything), and nothing really made the CLI pinentry GUI prompt for the password until I did this. If you're on MacOS and using pinentry, you can go to 🍎 > System Preferences > GPG Suite, then disable both Store in macOS keychainĪND click the Delete stored OpenPGP passwords button.ĭeleting OpenPGP passwords part is super important because if your password is already stored in the keychain, disabling the other 2 options won't be enough!
