I've ran into this for dnf only, but I assume it's the same for yum. I can't find any explanations on how this is supposed to work.

One can set repo_gpgcheck=1 in repository config file. So dnf is now supposed to check the signature of the repository data itself. I assume it still uses the gpgkey value from the repository config file.

How can I import that key into whatever key repository that dnf/yum are using to do the key check? I'm stuck with "Importing GPG key..." prompt every time the repository signature is validated, and there is no reason for me to not add a key as a trusted key. The keys imported by RPM do not work, I assume a different repository is checked for keys that can sign the repositories.



rpm --import <YOUR_PUBKEY_PATH_HERE>


  • 2
    This is for packages, not repositories, my question is specifically about repositories. Keys imported with RPM have no effect when DNF/YUM check repository signatures. – Pawel Veselov Oct 2 '18 at 20:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.