Why does the "gpg --gen-key" command give the error "gpg: Key generation canceled" for all user ?

Solution Unverified - Updated -

Issue

  • Why "gpg --gen-key" command give an error "gpg: cancelled by user" for normal user ?
can't connect to `/home/test/.gnupg/S.gpg-agent': No such file or directory
gpg-agent[24030]: directory `/home/test/.gnupg/private-keys-v1.d' created
gpg-agent[24030]: command get_passphrase failed: Operation cancelled
gpg: cancelled by user
gpg: Key generation canceled.
  • Why "gpg --gen-key" command give an error "gpg: problem with the agent: No pinentry" for root user ?
can't connect to `/root/.gnupg/S.gpg-agent': No such file or directory
/usr/bin/pinentry: line 22: xprop: command not found
Please install pinentry-gui
gpg-agent[32309]: can't connect server: ec=4.16383
gpg-agent[32309]: can't connect to the PIN entry module: End of file
gpg-agent[32309]: command get_passphrase failed: No pinentry
gpg: problem with the agent: No pinentry
gpg: Key generation canceled.

Environment

  • Red Hat Enterprise Linux 6.2
  • gpg2

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.