yum commands fail with Config Error: File contains no section headers.file: file://///etc/yum.repos.d/redhat.repo, line: 9'[]\n'
Issue
After a "yum update" got interpreted, all yum commands return the following error:
Config Error: File contains no section headers.
file: file://///etc/yum.repos.d/redhat.repo, line: 9
'[]\n'
The /etc/yum.repos.d/redhat.repo file now looks as follows:
# Certificate-Based Repositories
# Managed by (rhsm) subscription-manager
#
# If this file is empty and this system is subscribed consider
# a "yum repolist" to refresh available repos
#
[]
gpgcheck = 1
sslverify = 1
sslcacert = /etc/rhsm/ca/redhat-uep.pem
sslclientkey = /etc/pki/entitlement/6951533640253412352-key.pem
sslclientcert = /etc/pki/entitlement/6951533640253412352.pem
Environment
- Red Hat Enterprise Linux 5.7 and above
- Red Hat Subscription Manager registration (RHSM)
- subscription-manager-0.98.16.3-1.el5_8.x86_64
- python-rhsm-1.0.10-1.el5.x86_64
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.