LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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, 12:08 PM   #1
Shaggy1
LQ Newbie
 
Registered: Oct 2010
Posts: 24

Rep: Reputation: 1
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-09-2019, 12:13 AM   #2
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: A few
Posts: 3,596

Rep: Reputation: 972Reputation: 972Reputation: 972Reputation: 972Reputation: 972Reputation: 972Reputation: 972Reputation: 972
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 11:06 AM
GPG: Bad session key gpg between gpg on linux and gpg gui on windows XP konqi Linux - Software 1 07-21-2009 10:37 AM
rpm gpg public keys removal Infernal211283 Linux - Newbie 2 12-14-2005 12:58 PM
YUM requires public keys, how do I get public keys? GNUROCKS Linux - Newbie 3 05-29-2005 09:50 AM
Using GPG without public or private keys darin3200 Linux - Security 3 01-10-2005 04:40 AM

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

All times are GMT -5. The time now is 03:57 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration