gpg: public key decryption failed: Permission denied

Solution Verified - Updated -

Issue

When using gpg in batch mode, decryption of a file stops working:

> gpg --batch --yes --no-mdc-warning --passphrase A_SECRET --output CLEAR_TEXT.txt --decrypt CYPHER_TEXT.txt.pgp
[snip]
gpg: public key decryption failed: Permission denied
gpg: decryption failed: No secret key

Environment

  • Red Hat Enterprise Linux 8
  • gpgme

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content