GPG: Fail to import the secret key from previous gnupg2 version

Solution Verified - Updated -

Issue

  • When trying to import a gpg backup, the secret key is not imported, and following errors are displayed:

    gpg: error building skey array: Inappropriate ioctl for device 
    gpg: error reading '[stdin]': Inappropriate ioctl for device
    gpg: import from '[stdin]' failed: Inappropriate ioctl for device
    

Environment

  • Red Hat Enterprise Linux 8
    • gpg (GnuPG2)

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