use ssh private key from host in vagrant guest

前端 未结 3 2078
庸人自扰
庸人自扰 2021-02-02 12:24

I want to clone a bunch of private git repositories while provisioning a vagrant box. According to this article this should be possible using config.ssh.forward_agent = tr

3条回答
  •  青春惊慌失措
    2021-02-02 13:25

    It sounds like you may be hitting this particular bug: https://github.com/mitchellh/vagrant/issues/1735 (Despite it being "closed" it's actually not fixed)

    On Windows, SSH Forwarding in Vagrant does not work properly by default (because of a bug in net-ssh).

    However, there is a workaround or simple hack. You can auto-copy your local SSH key to the Vagrant VM via a simple provisioning script in your VagrantFile. Here's an example: https://github.com/mitchellh/vagrant/issues/1735#issuecomment-25640783

提交回复
热议问题