Skip to content

Repository Configuration

Oliver Kurth edited this page Dec 17, 2021 · 4 revisions

Repository Configuration

The repository config file resides in /etc/yum.repos.d unless otherwise configured. A typical repo file looks like this:

[photon-release]
name=VMware Photon Linux $releasever ($basearch)
baseurl=https://packages.vmware.com/photon/$releasever/photon_release_$releasever_$basearch
gpgkey=file:///etc/pki/rpm-gpg/VMWARE-RPM-GPG-KEY
gpgcheck=1
enabled=1
skip_if_unavailable=True

There can be multiple repositories configured in one repo config file, each one in its own section with their id (photon-release in the example above).

baseurl

Type: string

Default: none

The base url for the repository. This points to the location where the repodata reside. Allowed protocols are http:, https:, ftp:, ftps: and file:.

The URL can contain the variables $releasever and $basearch, which refer to the current release of the distribution (for example 4.0), and the architecture (for example x86_64 or aarch64).

enabled

Type: boolean

Default: false

Whether the repo is enabled. This can be overridden with the --disablerepo, --enablerepo, --repoid options on the command line.

gpgcheck

Type: boolean

Default: true

Whether to check packages for their gpg signature. If enabled, gpgkey needs to be set.

gpgkey

Type: list

Default: none

A list of URLs to the gpg keys. These will be downloaded if they are not on the system already. For URLs, allowed protocols are http:, https:, ftp:, ftps: and file:.

metalink

Type: string

Default: none

The URL of a metalink for the repository.

metadata_expire

Type: integer

Default: 172800 (2 days)

The maximum age for the downloaded metadata in seconds. If older, metadata will be refreshed on the next action that requires them.

minrate

Type: integer

Default: 0

name

Type: string

Default: none

A user friendly name for the repository.

password

Type: string

Default: none

The password for the repo, if required.

priority

Type: integer

Default: 50

The priority for the repository. Repositories will be ordered using this number, and those with a lower number will be preferred.

retries

Type: integer

Default: 10

How many times tdnf will retry a download on failure.

skip_if_unavailable

Type: boolean

Default: false

If the repository is not reachable and this is set tdnf will skip it.

sslcacert

Type: string

Default: none

sslclientcert

Type: string

Default: none

sslclientkey

Type: string

Default: none

sslverify

Type: boolean

Default: true

Whether to perform SSL verification.

throttle

Type: integer

Default: 0

username

Type: string

The username for the repo, if required.

Clone this wiki locally