我在 vagrant up 期间收到此错误
There are errors in the configuration of this machine. Please fix
the following errors and try again:
SSH:
* `private_key_path` file must exist: insecure_key
如何设置私钥才能通过 ssh 来使用 vagrant ssh?我使用的是 Windows 7。
我的流浪档案
Vagrant.configure("2") do |config|
config.vm.define "phusion" do |v|
v.vm.provider "docker" do |d|
d.cmd = ["/sbin/my_init", "--enable-insecure-key"]
d.image = "phusion/baseimage"
d.name = 'dockerizedvm'
d.has_ssh = true
#d.force_host_vm = true
end
v.ssh.port = 22
v.ssh.username = 'root'
v.ssh.private_key_path = 'insecure_key'
v.vm.provision "shell", inline: "echo hello"
#v.vm.synced_folder "./keys", "/vagrant"
end
end
所以就我而言,我使用的是cygwin与窗户,我收到:
* `private_key_path` file must exist:
C:\cygwin64\home\basic.user/.vagrant.d/insecure_private_key
经过几分钟的调查,我意识到 VAGRANT_HOME 环境变量不行,因此导出正确的环境变量就可以完成任务:
VAGRANT_HOME=/cygdrive/c/Users/basic.user
export VAGRANT_HOME
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)