Linux packages (dnf and yum)
Set up dnf and yum
Point dnf at a ForgeRepo™ mirror of your distro with a .repo file, and give it your token.
Your admin tells you the mirror address. Put it in a .repo file under /etc/yum.repos.d/, with your user name and your token:
$ cat /etc/yum.repos.d/company.repo [company-baseos] name=Company mirror of AlmaLinux 9 BaseOS baseurl=https://packages.example.com/rpm/almalinux-9-baseos/ username=your-user-name password=<your token> gpgcheck=1 repo_gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9 $ dnf repolist repo id repo name company-baseos Company mirror of AlmaLinux 9 BaseOS
Captured by running these commands against a real ForgeRepo™.
- Keep
gpgcheck=1. Every package is still checked against the distro's own key. - Keep
repo_gpgcheck=1too, unless your admin says the mirror hands out a filtered index. Then it has to be 0. - Make the file readable only by root:
chmod 600, since it holds your token. - Turn off the distro's own repositories, so every package comes through packages.example.com.
Then install as usual:
$ dnf install -y tree ... Install 1 Package Installed size: 113 k Downloading Packages: tree-1.8.0-10.el9.x86_64.rpm 2.0 MB/s | 55 kB 00:00 Installing : tree-1.8.0-10.el9.x86_64 1/1 Installed: tree-1.8.0-10.el9.x86_64 Complete!
Captured by running these commands against a real ForgeRepo™.