Why can't the public key created on Red Hat Enterprise Linux 6 machine encrypt file on Red Hat Enterprise Linux 7 and generate error "gpg2 encryption of fileXYZ failed Unusable public key" ?
Issue
- Why can't the public key created on Red Hat Enterprise Linux 6 machine encrypt file on Red Hat Enterprise Linux 7 and generate error "gpg2 encryption of fileXYZ failed Unusable public key" ?
[root@localhost ~]# gpg2 --list-keys
/root/.gnupg/pubring.gpg
------------------------
pub 0s/E7717893 2016-01-20
uid TraxPROD
[root@localhost ~]# gpg2 -r test --encrypt-files anaconda-ks.cfg
gpg: test: skipped: Unusable public key
gpg: encryption of `anaconda-ks.cfg' failed: Unusable public key
- Even after adding trust-always policy, it doesn't work
[root@rhel7 ~]# gpg2 -r test --trust-model always --encrypt-files anaconda-ks.cfg
gpg: test: skipped: Unusable public key
gpg: encryption of `anaconda-ks.cfg' failed: Unusable public key
Environment
- Red Hat Enterprise Linux 7
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.