yum报错:Bad id for repo

今天手动写了一份网易的centos源,缓存时报以下错:

[root@mailcc yum.repos.d]# yum makecache
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Bad id for repo: centos - updates, byte =   6

查了许久,发现原来是我写的格式有错误,原文如下:
[root@mailcc yum.repos.d]# cat centos-updates.repo
[centos - updates]
name=centos - updates
baseurl=http://mirrors.163.com/centos/6.3/updates/x86_64/
enabled=1
gpgcheck=0

“[centos - updates]”的格式不对,“centos”,“-”,“updates”之间是不允许存在空格的,删除即可。

你可能感兴趣的:(id,yum,for,Repo,bad)