How to override yum repository option using subscription-manager?
Environment
- Red Hat Enterprise Linux 5.7 and above
Issue
- How to override
yumrepository option usingsubscription-manager?
For example:
- How to change the gpgcheck value in
/etc/yum.repos.d/redhat.repousingsubscription-manager? - How to change the metadata_expire value in
/etc/yum.repos.d/redhat.repousingsubscription-manager?
Resolution
- To override the values in
/etc/yum.repos.d/redhat.repofile, 'repo-override' option can be used withsubscription-manager.
For example 1:
# subscription-manager repo-override --repo=rhel-7-server-rpms --add=gpgcheck:1
For example 2:
# subscription-manager repo-override --repo=rhel-7-server-rpms --add=metadata_expire:5s
For more information:
# subscription-manager repo-override --help
SBR
Product(s)
Components
Category
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.