Local EPEL repo sync

I have tried to dnf reposync for EPAL all the rpms are downloaded but then it removes them due to GPG signature check failed. How do I fix that?

dnf reposync -g --delete -p /data/repos/ --repoid=epel --newest-only --download-metadata

You need their gpg key imported into your rpm database first. I would install epel-release and then it’ll drop a gpg key for you.

If you download the repo file to your system you can remove the gpg check in the repo file by setting the value to 0. This is if you have built a local repository.

… of unsigned packages that you do trust.

Here, however, we are talking about a mirror of EPEL. EPEL packages are signed and EPEL key is available. There is no reason to disable that integrity check.

I had the gpg key added to my repo and it still deleted the packages so that is why I removed the check.

I installed the epel-release like below still same results as before. For now I disabled pgp check.

dnf install epel-release
dnf update

[epel]
name=Extra Packages for Enterprise Linux 8 - $basearch

It is much more secure to use the metalink, but if you wish to use a local mir ror

place its address here.

#baseurl=https://download.example/pub/epel/8/Everything/$basearch
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-8&arch=$basearch&i nfra=$infra&content=$contentdir
enabled=1
gpgcheck=0
countme=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8

[epel-debuginfo]
name=Extra Packages for Enterprise Linux 8 - $basearch - Debug

It is much more secure to use the metalink, but if you wish to use a local mir ror

place its address here.

#baseurl=https://download.example/pub/epel/8/Everything/$basearch/debug
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-8&arch=$base arch&infra=$infra&content=$contentdir
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8
gpgcheck=0

[epel-source]
name=Extra Packages for Enterprise Linux 8 - $basearch - Source

It is much more secure to use the metalink, but if you wish to use a local mir ror

place it’s address here.

#baseurl=https://download.example/pub/epel/8/Everything/source/tree/
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-source-8&arch=$bas earch&infra=$infra&content=$contentdir
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8
gpgcheck=0

You should add

to your local repo/dnf config. Otherwise the check doesn’t know what to use.

May I ask why you do a local repo of EPEL?