Try this instead, from a terminal.
1. Install the needed packages
Code:
sudo dnf install dnf-utils
2. Create your mirror directory
Code:
mkdir $HOME/Downloads/mirror
3. Sync all Fedora repositories(
This can take a while and may take quite a bit of disk space)
Code:
reposync -p $HOME/Downloads/mirror --download-metadata --repo=fedora
reposync -p $HOME/Downloads/mirror --download-metadata --repo=updates
reposync -p $HOME/Downloads/mirror --download-metadata --repo=fedora-modular
reposync -p $HOME/Downloads/mirror --download-metadata --repo=updates-modular
reposync -p $HOME/Downloads/mirror --download-metadata --repo=fedora-cisco-openh264
4. Make a backup of your current sources.
Code:
cd /etc/yum.repos.d
sudo mkdir original
sudo cp * original
5. Edit the files source files to the appropriate mirror directory. Take for example the
fedora repository. It currently looks like this.
Code:
[fedora]
name=Fedora $releasever - $basearch
#baseurl=http://download.example/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
enabled=1
countme=1
metadata_expire=7d
repo_gpgcheck=0
type=rpm
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False
Change it to this.
Code:
[fedora]
name=Fedora $releasever - $basearch
baseurl=file:///home/tux/Downloads/mirror/fedora
#baseurl=http://download.example/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
#metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
enabled=1
countme=1
metadata_expire=7d
repo_gpgcheck=0
type=rpm
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False
Also do this for:
updates fedora-modular update-modular fedora-cisco-openh264
Remember to change the base url path to match the location where you synced the repositories to. So replace the tux with your username.
6. When you have internet access again and need to update your local repositories you will have to comment out de line with your local repository and uncomment the original as it was before. Making the changes so taking
fedora as an example it would look like this with the lines we changed before.
Code:
#baseurl=file:///home/tux/Downloads/mirror/fedora
#baseurl=http://download.example/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
Also do this for
updates fedora-modular update-modular fedora-cisco-openh264.
7. Sync the repositories again to update your local repositories with the same commands as in step 3.
8. When you don't have access to an internet connection anymore change your source files back as they were before so than it's reverse. It would then look like this again, taking the
fedora repository as an example.
Code:
baseurl=file:///home/tux/Downloads/mirror/fedora
#baseurl=http://download.example/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
#metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
I tried all these steps myself so they should work, good luck!