How to Fix 'gpg: decryption failed: No pinentry' on macOS
Step-by-step guide to resolve GPG decryption failures caused by missing pinentry on macOS.

Recently, while using the pass password manager command-line tool on macOS, I encountered the following error message:
gpg: public key decryption failed: No pinentry
gpg: decryption failed: No pinentry
This issue occurs because the required dependency, pinentry, is missing. On macOS, you need to install pinentry-mac. To fix this, run:
brew install pinentry-mac
Next, configure GPG to use pinentry-mac by adding the following line to your gpg-agent.conf file:
echo "pinentry-program /usr/local/bin/pinentry-mac" > $HOME/.gnupg/gpg-agent.conf
After updating the configuration, restart the gpg-agent:
killall gpg-agent
gpg-agent --daemon --homedir $HOME/.gnupg
Once the gpg-agent restarts with the new configuration, the error should be resolved when you use pass again.
That’s all for today. I hope this guide helps you resolve the issue. Thanks for reading!


