Curl error (6): Couldn't resolve host name for https://mirrors

I’m trying to elevate from CentOS 7.9 to Alma 8. My problem is the proxy settings. I tried it befor with CentOS 7 to Rocky Linux 8 and it worked after I added my proxy settings to all repo files. But with AlmaLinux I still have the following problem:

STDERR:
No matches found for the following disable plugin patterns: subscription-manager
Repository extras is listed more than once in the configuration
Repository extras-source is listed more than once in the configuration
Warning: Package marked by Leapp to upgrade not found in repositories metadata: gpg-pubkey
Error: Error downloading packages:
  Curl error (6): Couldn't resolve host name for https://mirrors.almalinux.org/mirrorlist/8/baseos [Could not resolve host: mirrors.almalinux.org]

If I try curl https://mirrors.almalinux.org/mirrorlist/8/baseos I get the following:

http://mirrors.xtom.de/almalinux/8.9/BaseOS/$basearch/os/
http://mirror.fra.macarne.com/almalinux/8.9/BaseOS/$basearch/os/
http://mirror.de.leaseweb.net/almalinux/8.9/BaseOS/$basearch/os/
http://almalinux.mirrors.itworxx.de/8.9/BaseOS/$basearch/os/
https://almalinux.schlundtech.de/8.9/BaseOS/$basearch/os/
http://de.mirrors.clouvider.net/almalinux/8.9/BaseOS/$basearch/os/
http://ftp.uni-bayreuth.de/linux/almalinux/8.9/BaseOS/$basearch/os/
http://almalinux.repo.slimhost.com.ua/8.9/BaseOS/$basearch/os/
http://ftp.halifax.rwth-aachen.de/almalinux/8.9/BaseOS/$basearch/os/
http://mirror.speedkom.de/almalinux/8.9/BaseOS/$basearch/os/

Is there any way to solve this problem or am I out of luck? Disabling the proxy is not an option.

it kind of seems like you are in the same boat as me and no one has responded yet. I did find a site that has a work around but it is a dirty way to go about it. if you are upgrading from CentOS 7 to Alma8 you can try the following.

add your proxy setting to
/etc/leapp/files/leapp_upgrade_repositories.repo

but then also add it to
/var/lib/leapp/el8userspace/etc/dnf/dnf.conf

once you update these files you can use the bash script mention in the link below. it will require a little bit of modification. like the part about the SSL check and the proxy should match your info and update el= to 78
http://neilrieck.net/docs/linux_notes_leeap.html#script

but the process is to open 2 sessions to your host. one will run the script, the second will run the preupgrade and upgrade.

hope this helps.

Thanks, that actually worked. I was referred to that site a while ago but forgot about it because I couldn’t make head nor tail of it. Today it finally clicked. Now the adventure continues with the upgrade to AlmaLinux 9.

well it is nice to know that I am not the only one hitting this. but it would be nice to know a script to continually change /var/lib/leapp/el8userspace/etc/dnf/dnf.conf while trying to upgrade.

is anyone else able to provide input on this?

I found the below today and tried overwriting it with my internal repo that is in sync. The file keeps getting overwritten during the pre-check
/var/lib/leapp/el8userspace/etc/yum.repos.d/epel.repo

[el8-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 mirror

place its address here.

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