yum with gpg-signed packages


Problem

Trying to install packages or updates using yum, quite likely on Fedora Core. But it fails with a long but unhelpful error message, something like this:


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

For more information contact your distribution or package provider.


Solution

  #
  #  yum wants packages gpg-signed by default... here's where some
  #  of the keys hide and how to find them (tested on fedora core 3)
  #  note you may also want more reasonable things in /etc/yum.conf
  #    and /etc/yum.repos.d than the default install provides
  #
  #  there's a fedora key at http://www.fedora.us/FEDORA-GPG-KEY
  #
  find /usr/share -name '*GPG-KEY*' -print
  rpm --import /usr/share/doc/fedora*/*GPG-KEY*
  rpm --import /usr/share/doc/rpm*/*GPG-KEY*
  rpm --import /usr/share/rhn/*GPG-KEY*


keywords: yum,linux,install,package,packages,rpm,manager
date: 03/10/2005