linux-package-repositories
linux-package-repositories copied to clipboard
[RHEL] Include gpg key in repo packages
Describe the problem you are experiencing. Example RHEL8 but it applies to all rhel versions.
http://packages.microsoft.com/rhel/8/prod/Packages/p/packages-microsoft-prod.rpm currently includes a single file /etc/yum.repos.d/microsoft-prod.repo
with the contents:
[packages-microsoft-com-prod]
name=packages-microsoft-com-prod
baseurl=https://packages.microsoft.com/rhel/8/prod
enabled=1
gpgcheck=1
gpgkey=https://packages.microsoft.com/keys/microsoft.asc
sslverify=1
Describe any possible solutions that you would like to see.
Supply gpg key in rpm put it into /etc/pki/rpm-gpg/RPM-GPG-KEY-Microsoft-EL[789]
and use it in the repository file like gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Microsoft-EL[789]
maybe use different ones for rhel major releases so you can easily update it every couple of years :)