yum がエラー "Peer cert cannot be verified or peer cert invalid" または "certificate verify failed" で失敗する
Issue
- yum コマンドが以下のエラーで失敗します。
Error: failed to retrieve repodata/<long-string>-primary.xml.gz from rhel-x86_64-server-6
error was [Errno 14] Peer cert cannot be verified or peer cert invalid
- Red Hat Subscription Manager に登録されている場合、
yum check-updateを実行すると、以下のエラーが発生します。
[root@rserver ~]# yum check-update
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is receiving updates from Red Hat Subscription Management.
https://cdn.redhat.com/content/dist/rhel/server/6///optional/os/repodata/repomd.xml: [Errno 14] Peer cert cannot be verified or peer cert invalid
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: example_repo1. Please verify its path and try again
- 証明書関連のエラーは、以下のような他の関連する yum コマンドの実行によっても発生する可能性があります。
yum repolist
yum update
yum search
yum list
or it may even come before the registration occurs
subscription-manager register
このコマンドを実行すると、以下のようなエラーが発生する可能性があります。
unable to verify servers identity: certificate verify failed
Environment
- Red Hat Enterprise Linux 5.x
- Red Hat Enterprise Linux 6.x
- Red Hat Enterprise Linux 7.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.