I\'m having loads of trouble getting my Chef recipe to clone a private repo. Well, I had it working yesterday but after \'cheffin\' my Vagrant box half a dozen times, I\'ve brok
Your question doesn't have a link to to the deploy_resource
source, so I can't be sure if this will apply, but if it uses a git
resource underneath, the following might be helpful...
As described in this answer to a similar question, you can avoid creating extra script files to go with each SSH key by adding the SSH command as an "external transport" part of the repository URL:
git "/path/to/destination" do
repository "ext::ssh -i /path/to/.ssh/deployment_key -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no git@github.com %S /my_name/some_repo.git"
branch "master"
...
end