1 (edited by khav 2023-02-19 13:05:17)

Topic: Installing remi repo in a bash script

Hi,

I install epel & remi repo in my bash script as follows

echo "Setting Up EPEL and remi Repositories"
{
dnf install epel-release -y -q
/usr/bin/crb enable
rpm --quiet --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi
dnf -y -q install https://rpms.remirepo.net/enterprise/remi-release-9.rpm
} &> /dev/null

I keep getting the following on Rocky linux 9.1 when i am installing a package via dnf

dnf -y -q install <package_name>

Importing GPG key 0x478F8947:
Userid     : "Remi's RPM repository (https://rpms.remirepo.net/) <remi@remirepo.net>"
Fingerprint: B1AB F71E 14C9 D748 97E1 98A8 B195 27F1 478F 8947
From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-remi.el9
Is this ok [y/N]: y

How can i import the key needed so that i don't get the prompt every time and unfortunately `dnf -y -q install` isn't enough to put my answer to `yes` for importing keys?

Re: Installing remi repo in a bash script

> rpm --quiet --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi

You should import the proper key for EL-9
https://rpms.remirepo.net/RPM-GPG-KEY-remi2021

Or /usr/share/distribution-gpg-keys/remi/RPM-GPG-KEY-remi2021
(if "distribution-gpg-keys" package is installed)

Or /etc/pki/rpm-gpg/RPM-GPG-KEY-remi.el9
(if "remi-release" is installed)

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Installing remi repo in a bash script

Thanks remi , i was importing the wrong key

Re: Installing remi repo in a bash script

smile

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi