查看厨师的文档,您可以添加
ssh_wrapper
此的参数
https://docs.chef.io/resource_git.html
可能的
你的
ssh\u包装
ssh_wrapper "ssh -i /some/path/id_rsa"
所有参数
git 'name' do
additional_remotes Hash
checkout_branch String
depth Integer
destination String # defaults to 'name' if not specified
enable_checkout TrueClass, FalseClass
enable_submodules TrueClass, FalseClass
environment Hash
group String, Integer
notifies # see description
provider Chef::Provider::Scm::Git
reference String
remote String
repository String
revision String
ssh_wrapper String
subscribes # see description
timeout Integer
user String, Integer
action Symbol # defaults to :sync if not specified
end