Skip to content

Instantly share code, notes, and snippets.

@caryp
Created July 2, 2009 21:06
Show Gist options
  • Save caryp/139716 to your computer and use it in GitHub Desktop.
Save caryp/139716 to your computer and use it in GitHub Desktop.
#
# Cookbook Name:: repo_git
# Definition:: repo_git_pull
#
define :repo_git_pull, url => nil, branch => 'master', dest => nil, user => nil, cred => nil do
# add repository credentials
if params[:cred] != nil
ssh_params = params # this line is needed for nested definitions
auth_ssh_add_cred "add_credential_for_repo" do
user ssh_params[:user] # this works...
host ssh_params[:url] # so does this...
template "git.erb"
cred params[:cred] # ...this doesn't!
end
end
<snip> ....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment