I have used GPG on Windows and Linux and they always ask me for password to unlock a private key. Sometimes they cache a password inside the agent, but after each restart I have to enter a password at least once.

This is not a case on my MacBook. Whenever I do sign or decrypt, it never asks me for a password to unlock the prate key! It only asks for the password when I am importing or exporting a private key.

It seems like my private keys are stored unprotected within the OS, which makes me unnervous.

Does anyone know what is going on here?

macOS Big Sur 11.6 running gpg (GnuPG/MacGPG2) 2.2.27

1 Answer 1


If you selected Save in Keychain when entering your password to GPG, it was saved in your login keychain.

This keychain is automatically unlocked when you enter your password to log in or unlock from sleep, and you can manually lock it from Keychain Access (or its menu bar item) and/or remove the item from keychain to enter it every time.

  • Thank - that explains where they are. But there is no option to select "Save in Keychain" when entering a password while importing the key.
    – Gigi
    Sep 17, 2021 at 17:47
  • So it looks like I can remove these passwords from Keychain Access. However each time I enter a password to unlock a private key, it gets (re)stored inside Keychain Access while not giving me any option to not do it.
    – Gigi
    Sep 17, 2021 at 18:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .