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

自古美人都是妖i 提交于 2019-12-22 10:10:02

问题


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


回答1:


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



来源:https://stackoverflow.com/questions/10699333/vagrant-to-test-chef-recipies-but-how-to-deal-with-private-git

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!