LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   CentOS (https://www.linuxquestions.org/questions/centos-111/)
-   -   GPG public keys installation (https://www.linuxquestions.org/questions/centos-111/gpg-public-keys-installation-4175663862/)

Shaggy1 11-07-2019 11:08 AM

GPG public keys installation
 
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)

berndbausch 11-08-2019 11:13 PM

Keys should be put in place when installing the OS. I suppose something is wrong with your installation process or source, or kickstart file.

https://www.centos.org/keys/ has information how to obtain and install keys.


All times are GMT -5. The time now is 10:12 AM.