When deploying an application with Chef, I\'ve got the code base set to be cloned from a private github repository with the following resource:
git \'/mnt/ap
Based on the hint by sadaf2605, this was the easiest way for me – I just had to make sure to set the correct user/group as well as turn off StrictHostKeyChecking:
git '/path/to/destination' do
environment 'GIT_SSH_COMMAND' => 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i /path/to/private_key'
repository 'git@github.com:your/repo.git'
reference 'master'
action :sync
user 'vagrant'
group 'vagrant'
end