与厨师一起查看 Git 存储库?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11769219/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 14:17:06  来源:igfitidea点击:

Check out a Git repository with chef?

gitgithubversion-controlchef

提问by Victor Pudeyev

I have a Git repository I would like to check out onto a server. Is there a Chef recipe that does that?

我有一个 Git 存储库,我想在服务器上签出。有没有厨师食谱可以做到这一点?

回答by Marc Paradise

The git SCM resourceis probably what you're looking for. Simple resource usage example:

git SCM 资源可能正是您要找的。简单的资源使用示例:

git "/path/to/check/out/to" do
  repository "git://github.com/opscode/chef.git"
  reference "master"
  action :sync
end

Also see "revision" attribute if you want to grab a specific branch.

如果您想获取特定分支,另请参阅“修订版”属性。