Troubleshooting

An administrator adds a third-party repository file to /etc/yum.repos.d/ on a RHEL server. Metadata downloads succeed, but dnf install fails with "Public key for package.rpm is not installed" and the repository has gpgcheck=1. Which action BEST resolves the problem?

Show the answer

Correct answerC. Import the vendor's public GPG key with rpm --import

Package signatures cannot be verified until the vendor's public key is in the RPM keyring, so importing it fixes the cause. Disabling gpgcheck would install unverified packages, and cleaning the cache does not add a missing key.