LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 11-07-2019, 11:08 AM   #1
Shaggy1
Member
 
Registered: Oct 2010
Posts: 111

Rep: Reputation: 3
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)
 
Old 11-08-2019, 11:13 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
gpg / gpg-agent -- Can't connect to /root/.gnupg/S.gpg-agent jrtayloriv Linux - Security 9 06-03-2019 10:06 AM
GPG: Bad session key gpg between gpg on linux and gpg gui on windows XP konqi Linux - Software 1 07-21-2009 09:37 AM
rpm gpg public keys removal Infernal211283 Linux - Newbie 2 12-14-2005 11:58 AM
YUM requires public keys, how do I get public keys? GNUROCKS Linux - Newbie 3 05-29-2005 08:50 AM
Using GPG without public or private keys darin3200 Linux - Security 3 01-10-2005 03:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 05:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration