Created
July 2, 2009 21:06
-
-
Save caryp/139716 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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