How to handle nokey error in yum security transfer software package, yumnokey
Problem description
Solution to error code: warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID e856289
When we run the yum install + package name command, we may encounter an error, which will show that when you did not import the public key, the code shown in is displayed.
Problem Analysis
Before answering this question, we need to know some concepts, such as public key and private key? What is the connection and how to solve the problem.
Solution
Configure the default gppkey path in the yum source repository. We usually configure the yum source in/etc/yum. repos. d/configure in this directory. During configuration, first clear some of the original files, use rm-rf * to restore to the initial state, and then perform the following configuration in the file. Specify the Public Key address in the Yum source repository.
[Centos] name = bigebaseurl = file: // var/ftp/pub/6 gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Use rpm to import public keys
We already know that the Public Key address is in the/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6, then we can tap this command in the command line, to help us import Public Key rpm -- import/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
The above two methods can easily solve the problems we encountered in the production environment <