I had placed crt key from “Distributor”, and then checked and successed.
But “knife cookbook upload” failed.
- Chef Server
- Hostname : “Distributor”
- Cent OS 7
- chef-server-core-12.4.1-1.el7.x86_64
- Workstation(kitchen)
- Hostname : “Workstation”
- Cent OS 7
- chefdk-0.11.2-1.el7.x86_64.rpm
Why certification failed, and what is workaround?
[account@Workstation chef-repo]$ knife ssl check Connecting to host Distributor:443 Successfully verified certificates from `Distributor' [account@Workstation chef-repo]$ knife cookbook list [account@Workstation chef-repo]$ knife cookbook upload example Uploading example [1.0.0] ERROR: SSL Validation failure connecting to host: distributor - hostname "distributor" does not match the server certificate ERROR: SSL Error connecting to https://distributor/bookshelf/organization-ccad6652ef52c0e8dee7dd227773ea8a/checksum-92a639ad39af9c4f51d46b7bfcf69bb6?AWSAccessKeyId=52bdfe8139b3bdfb710a544169b3682c11c9e174&Expires=1458289269&Signature=N8Pih1UY1rt1vGTVvlLoZFG0oMQ%3D, retry 1/5 ERROR: SSL Validation failure connecting to host: distributor - hostname "distributor" does not match the server certificate ERROR: SSL Error connecting to https://distributor/bookshelf/organization-ccad6652ef52c0e8dee7dd227773ea8a/checksum-2379ce6d82f773a3ce050c87b32c4c7d?AWSAccessKeyId=52bdfe8139b3bdfb710a544169b3682c11c9e174&Expires=1458289269&Signature=2wMxcjUAEd7lMNQ/RwZv30/ssbk%3D, retry 1/5 ERROR: SSL Validation failure connecting to host: distributor - hostname "distributor" does not match the server certificate ERROR: SSL Error connecting to https://distributor/bookshelf/organization-ccad6652ef52c0e8dee7dd227773ea8a/checksum-2645d8b91137912a590407fa530be964?AWSAccessKeyId=52bdfe8139b3bdfb710a544169b3682c11c9e174&Expires=1458289269&Signature=F6uDdJFzlAgV9vBlK92Sf7RLWck%3D, retry 1/5 ERROR: SSL Validation failure connecting to host: distributor - hostname "distributor" does not match the server certificate ERROR: SSL Error connecting to https://distributor/bookshelf/organization-ccad6652ef52c0e8dee7dd227773ea8a/checksum-f7e821e5c5e80279c1cb09315ca6e43a?AWSAccessKeyId=52bdfe8139b3bdfb710a544169b3682c11c9e174&Expires=1458289269&Signature=1NUEjokCCmhZ%2BRA/RUxWHGx8QvM%3D, retry 1/5
Answer
looks like you got the wrong .pem file selected in your knife.rb
check your knife.rb
and check if your key is correct. it should look something like this (inside your knife.rb
)
client_key "#{current_dir}/yourkey.pem"
Attribution
Source : Link , Question Author : user344314 , Answer Author : chicks