yumrhel

My custom yum repository cannot see RPM files


I have configured a custom repository with nginx RPMs. It is located on my local Artifactory: https://artifactory/artifactory/rpm-nginx-prod-local/rhel8/ I can see that my RPMs are there:

Index of rpm-nginx-prod-local/rhel8

Name                               Last modified      Size

../
repodata/                           11-Apr-2023 12:47    -
nginx-1.18.0-2.el8.ngx.x86_64.rpm   03-Dec-2020 15:00  798.63 KB
nginx-1.20.2-1.el8.ngx.x86_64.rpm   03-Dec-2021 12:07  820.03 KB
nginx-1.22.0-1.el8.ngx.x86_64.rpm   13-Jul-2022 14:28  826.56 KB
nginx-1.22.1-1.el8.ngx.x86_64.rpm   02-Nov-2022 14:03  828.23 KB

Artifactory/7.55.10 Server at artifactory Port 80

I also configured /etc/yum.repos.d/:

cat /etc/yum.repos.d/nginx-rpms-rhel.repo

[nginx-rpms-rhel]
name=nginx - RHEL8 - x86_64 - REPO
baseurl=https://artifactory/artifactory/rpm-nginx-prod-local/rhel8/
enabled=1
fastestmirror_enabled=0
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
proxy=_none_

But when I try to list anything from that repo I get:

yum search * --enablerepo=nginx-rpms-rhel --disablerepo="*"
No matches found.

yum install nginx --disablerepo=* --enablerepo=nginx-rpms-rhel
Error: Unable to find a match: nginx

yum install --disablerepo=* --enablerepo=nginx-rpms-rhel nginx-1.22.1-1.el8.ngx.x86_64
Error: Unable to find a match: nginx-1.22.1-1.el8.ngx.x86_64

This looks really odd to me, because there are rpms in my Artifactory. I'm running on RHEL8. I've tried to do yum clean all, but it is not the case. Any ideas?


Solution

  • You can try to remove nginx.*yaml from

    rm -rf /var/lib/dnf/modulefailsafe/nginx*.yaml