I'm trying to upgrade from Fedora 34 to 39 and get the following error:
$ sudo dnf system-upgrade download --releasever=39 --skip-broken --allowerasing
... <download> ...
[SKIPPED] x265-libs-3.5-6.fc39.x86_64.rpm: Already downloaded
[SKIPPED] libdvdcss-1.4.3-5.fc39.x86_64.rpm: Already downloaded
[SKIPPED] pipewire-codec-aptx-0.3.84-1.fc39.x86_64.rpm: Already downloaded
Fedora 39 - x86_64
Fedora 39 - x86_64 0.0 B/s | 0 B 00:00
Curl error (37): Couldn't read a file:// file for file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-39-x86_64 [Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-39-x86_64]
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
I tried
sudo dnf clean all
sudo rpm --import \ "https://rpmfusion.org/keys?action=AttachFile&do=get&target=RPM-GPG-KEY-rpmfusion-free-fedora-$(rpm -E %fedora)" \ "https://rpmfusion.org/keys?action=AttachFile&do=get&target=RPM-GPG-KEY-rpmfusion-nonfree-fedora-$(rpm -E %fedora)" sudo dnf reinstall \ "https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm" \ "https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm"
but that did not help in this case.
It looks from your excerpt that you are concerned with some packages provided by an external repo beyond the control or influence of the Fedora Project. And, it looks like that's where you try to import a new GPG key from.
But, the file it's looking for is actually our official one, provided by fedora-gpg-keys
. You can get that from https://fedoraproject.org/fedora.gpg