yum commands fail with Config Error: File contains no section headers.file: file://///etc/yum.repos.d/redhat.repo, line: 9'[]\n'

Solution Verified - Updated -


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

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


  • Red Hat Enterprise Linux 5.7 and above
  • Red Hat Subscription Manager registration (RHSM)
  • subscription-manager-
  • 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.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content