我尝试使用厨师为部署添加授权密钥,但我收到了无方法错误。
[2016-01-25T21:24:01+00:00] ERROR: No resource or method named `user_ssh_keys_key' for `Chef::Recipe "user"'
user_ssh_keys_key 'deploy' do
authorized_keys node['ssh_public_keys']
authorized_users %w(deploy)
end
cookbook 'user-ssh-keys', '~> 1.0.2'
default['ssh_public_keys'] = ['...','...']
答案 0 :(得分:4)
您能否检查一下您是否已将依赖关系添加到user-ssh-keys
中的metadata.rb
食谱中?
它应该是这样的:
depends 'user-ssh-keys', '~> 1.0.2'