我是厨师的新手,并且一直在尝试将此代码从木偶转换为厨师。
vcsrepo { "C:ProgramDatachecks":
ensure => latest,
provider => 'git',
source => "git@domain.org:ops/checks.git",
identity => "C:/ProgramData/id_rsa",
notify => Service["Service_Agent"],
}
不幸的是,这在Chef Core中并不直接使用,专门使用带有git
资源的SSH键。查看添加此的poise-git
食谱和poise_git
资源。
poise-git
不起作用。
这是有效的方法:编辑C: Program Files git etc ssh ssh_config
添加SSH键的路径:
Host SERVER_FQDN
IdentityFile C:pathid_rsa
使用此食谱:
git 'C:\destination\here' do
repository 'git@domain.org:name.git'
end