Article 4TTJZ GPG public keys installation

GPG public keys installation

by
Shaggy1
from LinuxQuestions.org on (#4TTJZ)
Hi

After installing centos 7 (via pxeboot/kickstart file) when I tried to install a package I got the following error:
You have enabled checking of packages via GPG keys. This is a good thing.
However, you do not have any GPG public keys installed. You need to download
the keys for packages you wish to install and install them.
You can do that by running the command:
rpm --import public.gpg.key
...

When I try the recommended command I get an error:
rpm --import public.gpg.key
error: public.gpg.key: import read failed(2).

A search for this issue took me to some sites that suggested the GPG key rpm should be found somewhere in /usr/share, but it did not exist in my installation.

Eventually I resolved this (such that I did not need to get round it by using --nogpgcheck) by copying the RPM-GPG-KEY-CentOS-7 from the installation iso and installing it using the command:
rpm --import RPM-GPG-KEY-CentOS-7

Does anyone know how I can ensure RPM-GPG-KEY-CentOS-7 is installed automatically when I install the OS ? Or does one always have to explicitly get it from a mirror site ?
Does anyone know how I can have this automatically installed from from my kickstart file ? (or is a post install wget the only way)latest?d=yIl2AUoC8zA latest?i=8YfaoA5zEuU:TRfj6zUdxKE:F7zBnMy latest?i=8YfaoA5zEuU:TRfj6zUdxKE:V_sGLiP latest?d=qj6IDK7rITs latest?i=8YfaoA5zEuU:TRfj6zUdxKE:gIN9vFw8YfaoA5zEuU
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments