Vagrant to test chef recipies - but how to deal with private git

chef-infra, git, github, vagrant

Solution

use ssh keys with passphrase on a vagrant+chef setup will have similar answers that might be helpful.

Without knowing more details of chef-solo, or chef-client + chef-server. It comes down to ssh keys.

Make sure you are authing with something like `git@github.com:user/repo.git`

Then you will want to ensure that your VM and underlying host is ssh agent forwarding.

Make sure your ~/.ssh/config has the appropriate line. A general example is.

host *
    ForwardAgent yes

Remember that first match wins in ~/.ssh/config , not the most specific

Then you may have to add any identities with `ssh-add` and make sure `ssh-agent` is there as well.

Finally, in the Vagrantfile, `config.ssh.forward_agent = true`

Problem

I use vagrant to test my chef recipes. The issue is that I have clone my private repo and the machine is not auteticated. How can i automated git authentication to boostrap chef? I am using the vagrant ubuntu 11.10 with chef. Thanks

Original source

Related problems