Chef infra 厨师长:流浪汉的客户端身份验证问题
我正在尝试使用Chef infra 厨师长:流浪汉的客户端身份验证问题,chef-infra,Chef Infra,我正在尝试使用chef\u client作为供应者。目前,我收到以下信息: ==> default: ================================================================================ ==> default: Chef encountered an error attempting to create the client "vagrant-3ccfff14" ==> default: ======
chef\u 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\u键作为“/tmp/vagrant chef/validation.pem”
,而不是选择我在vagrant文件上设置的living.pem
文件:
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服务器上创建的帐户作为云(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"]
然后我执行了检查:
Connecting to host api.chef.io:443
Successfully verified certificates from `api.chef.io'
这意味着您的验证客户端名称或密钥(可能是后者)不正确。您可以通过Chef Web UI或knife客户端重新设置密钥
Chef.validation\u key\u path='living.pem'
谢谢@Tensibai。在设置完整路径之前,我测试了它。然而,它总是失败(消息是一样的)。validation.pem
文件被复制到temp/vagrant chef
…我的意思是,此路径是相对于主机的,请使用此文件的实际位置的完整路径,而不是虚拟机。是的,是的。我已尝试设置托管的living.pem
的完整路径。所以,我在一台windows机器上工作,我尝试了D:\projects\living\vagrant\production\centos\living.pem
。这个living.pem
文件位于Vagrantfile
所在的位置。我的意思是validation.pem
文件被复制到/tmp/vagrant chef
中,内容为living.pem
。这可能是与验证\u客户端\u名称相关的问题
?