14.4.2. [repository] Options
[repository] section of the
/etc/yum.conf file contains information about a repository
yum can use to find packages during package installation, updating and dependency resolution. A repository entry takes the following form:
[repository ID] name=repository name baseurl=url, file or ftp://path to repository
You can also specify repository information in a separate
.repo files (for example,
rhel5.repo). The format of repository information placed in
.repo files is identical with the
.repo files are typically placed in
/etc/yum.repos.d, unless you specify a different repository path in the
[main] section of
.repo files and the
/etc/yum.conf file can contain multiple repository entries.
Each repository entry consists of the following mandatory parts:
- [repository ID]
- The repository ID is a unique, one-word string that serves as a repository identifier.
- This is a human-readable string describing the repository.
baseurl=http, file or ftp://path
- This is a URL to the directory where the
repodatadirectory of a repository is located. If the repository is local to the machine, use
baseurl=file://path to local repository. If the repository is located online using HTTP, use
baseurl=http://link. If the repository is online and uses FTP, use
baseurl=ftp://link.If a specific online repository requires basic HTTP authentication, you can specify your username and password in the
baseurlline by prepending it as username:password@link. For example, if a repository on http://www.example.com/repo/ requires a username of "user" and a password os "password", then the
baseurllink can be specified as
The following is a list of options most commonly used in repository entries. For a complete list of repository entries, refer to
gpgcheck=<1 or 0>
- This disables/enables GPG signature checking a specific repository. The default is
gpgcheck=0, which disables GPG checking.
- This option allows you to point to a URL of the ASCII-armoured GPG key file for a repository. This option is normally used if
yumneeds a public key to verify a package and the required key was not imported into the RPM database.If this option is set,
yumwill automatically import the key from the specified URL. You will be prompted before the key is installed unless you set
- This option is similar to the
excludeoption in the
/etc/yum.conf. However, it only applies to the repository in which it is specified.
- This option is the opposite of
exclude. When this option is set on a repository,
yumwill only be able to see the specified packages in that repository. By default, all packages in a repository are visible to