GPG Key Generation fails with "Key generation failed: No pinentry"
Issue
- When trying to generate key using command
gpg --gen-key
, got errorgpg: problem with the agent: No pinentry
or
gpg: Key generation canceled.Key generation failed: No pinentry
Environment
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.