Chef:与vagrant的客户端身份验证问题

时间:2017-02-21 11:25:01

标签: chef

我尝试使用chef_client作为配置程序。目前,我收到此消息:

==> default: ================================================================================
==> default: Chef encountered an error attempting to create the client "vagrant-3ccfff14"
==> default: ================================================================================
==> default:
==> default: Authentication Error:
==> default: ---------------------
==> default: Failed to authenticate to the chef server (http 401).
==> default:
==> default: Server Response:
==> default: ----------------
==> default: Invalid signature for user or client 'living-digital-validator'
==> default:
==> default: Relevant Config Settings:
==> default: -------------------------
==> default: chef_server_url         "https://api.chef.io/..."
==> default: validation_client_name  "living-digital-validator"
==> default: validation_key          "/tmp/vagrant-chef/validation.pem"
==> default:
==> default: If these settings are correct, your validation_key may be invalid.
==> default:
==> default: Platform:
==> default: ---------
==> default: x86_64-linux
==> default:

它试图选择validation_key作为"/tmp/vagrant-chef/validation.pem",而不是选择我living.pem上设置的Vagrantfile文件:

config.vm.provision "chef_client" do |chef|
    chef.add_recipe 'custom_recipe'
    chef.chef_server_url = 'https://api.chef.io/...'
    chef.validation_key_path = 'living.pem'
    chef.validation_client_name = 'living-digital-validator'
end

我使用我刚在Chef Server上创建的帐户作为云(Chef Manage)。

为什么选择pem代替Vagranfile上的knife.rb

我已在此内容中创建了current_dir = File.dirname(__FILE__) log_level :info log_location STDOUT node_name "living" client_key "#{current_dir}/living.pem" chef_server_url "https://api.chef.io/..." cookbook_path ["#{current_dir}/../cookbooks"] 个文件:

knife ssl check

然后我执行了Connecting to host api.chef.io:443 Successfully verified certificates from `api.chef.io'

o

1 个答案:

答案 0 :(得分:0)

这意味着验证客户端名称或密钥(可能是后者)不正确。您可以通过Chef Web UI或knife client rekey重置密钥。