Victor Piousbox Victor Piousbox - 3 months ago 22
Git Question

Check out a Git repository with chef?

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

Answer

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

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.