My dude,
While not entirely sure why the URL for the default remote is failing, using the mirror URL does work:
% cat /etc/ostree/remotes.d/fedora-iot.conf
[remote "fedora-iot"]
url=https://ostree.fedoraproject.org/iot/
gpg-verify=true
gpgkeypath=/etc/pki/rpm-gpg/
contenturl=mirrorlist=https://ostree.fedoraproject.org/iot/mirrorlist
So, in order to “fix” this issue, we need to create a new OSTree remote pointing to the mirror URL.
However, bear in mind that by doing so we are slightly deviating from the way IoT is supposed to be configured; for instance, we will need to rebase our current deployment with the new remote for rpm-ostree
to be able to interact with the remote repository.
Personally, I will keep a close eye on this issue and revert back to the original remote as soon as this issue is fixed.
Enough chatter, let’s tighten those loose nuts! 
TL;DR
Assumptions:
% cat /etc/os-release
...
PRETTY_NAME="Fedora Linux 37.20221023.0 (IoT Edition)"
...
% uname -i
x86_64
Workaround steps:
- Let’s create a new OSTree remote:
sudo ostree remote add --if-not-exists \
--gpg-import=/etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-37-x86_64 \
fedora-iot-mirrorlist \
https://d2ju0wfl996cmc.cloudfront.net
- Now we need to remove the broken remote, but before doing so let’s back it up:
backupDir="$HOME/backups/etc/ostree/remotes.d/" \
&& mkdir -p $backupDir \
&& cp /etc/ostree/remotes.d/fedora-iot.conf $backupDir
- With peace of mind we can now revert any changes made to the default remote, let’s remove it:
sudo ostree remote delete fedora-iot
- If everything went well, the script should now work properly:
deployment="$(ls -Art /sysroot/ostree/deploy/fedora-iot/deploy | tail -n 1)" \
/sysroot/ostree/deploy/fedora-iot/deploy/$(echo "${deployment%%*(.origin)}")/usr/lib/greenboot/check/wanted.d/01_update_platforms_check.sh
# Quick explanation of the oneliner
# The ephemeral 'deployment' variable stores the filename of the newest file
# in the directory.
# We then trim the extension `.origin` because what we are really looking for
# is the newest directory name, which contains the booted OSTree deployment:
# $(echo "${deployment%%*(.origin)}")
# Credits for this trick to https://linuxhint.com/trim_string_bash/
- Because we removed the original OSTree remote the system is based on,
rpm-ostree
will fail when trying to upgrade the system.
The solution to this is to rebase our deployment on the new remote:
/*
sudo rpm-ostree upgrade -r
error: While pulling fedora/devel/x86_64/iot: Remote "fedora-iot" not found
*/
sudo rpm-ostree rebase fedora-iot-mirrorlist:fedora/devel/x86_64/iot
sudo rpm-ostree upgrade -r
Note: when rebasing your deployment, pay attention to the remote branch you want to rebase it on, in my case it’s devel.
You can get a list of the available branches with the refs OSTree remote sub-command:
% sudo ostree remote refs fedora-iot-mirrorlist
fedora-iot-mirrorlist:fedora/29/aarch64/iot
fedora-iot-mirrorlist:fedora/29/armhfp/iot
fedora-iot-mirrorlist:fedora/29/x86_64/iot
fedora-iot-mirrorlist:fedora/30/aarch64/iot
fedora-iot-mirrorlist:fedora/30/armhfp/iot
fedora-iot-mirrorlist:fedora/30/x86_64/iot
fedora-iot-mirrorlist:fedora/devel/aarch64/iot
fedora-iot-mirrorlist:fedora/devel/armhfp/iot
fedora-iot-mirrorlist:fedora/devel/x86_64/iot
fedora-iot-mirrorlist:fedora/rawhide/aarch64/iot
fedora-iot-mirrorlist:fedora/rawhide/armhfp/iot
fedora-iot-mirrorlist:fedora/rawhide/x86_64/iot
fedora-iot-mirrorlist:fedora/stable/aarch64/iot
fedora-iot-mirrorlist:fedora/stable/armhfp/iot
fedora-iot-mirrorlist:fedora/stable/x86_64/iot
You shouldn’t see anymore the error message on subsequent logins.
HTH