puphpet / puphpet

Vagrant/Puppet GUI
Other
3.83k stars 626 forks source link

SSH: * private_key_path file must exist: P://.vagrant.d/insecure_private_key #2229

Closed vjaro closed 8 years ago

vjaro commented 8 years ago

My host is windows and my vm is CentOS I am experiencing this error on my vm SSH: * private_key_path file must exist: P://.vagrant.d/insecure_private_key

I know that the workaround is

config.ssh.private_key_path = [
    customKey,
    "C:/Users/My.User/.vagrant.d/insecure_private_key"
]

However, i am sharing my puphet configuration across my team and i dont want to hard code this value. I am also aware that i can use environment variable for this so i tried setting the VAGRANT_HOME and HOME variables to %USERPROFILE% so it points to the current user logged in but does not work. Am i on the right track?

vjaro commented 8 years ago

OK so what i happened is i've set the VAGRANT_HOME to %USERPROFILE% but did not close the cli where i was running vagrant up. It dawned on me that i need to close the opend command prompts in order for the environment variables to propagate. Closed the open command prompts then reopened it then run vagrant up and voila!

Thanks.