由于查找文件 id_rsa.pub,Vagrant up 失败

Vagrant up fails due to lookup file id_rsa.pub

我的机器上有这个问题,vagrant up --provision(突然只能使用 sudo 前缀)在查找文件 id_rsa.pub.

时挂起

文件已就地创建,但仍然出现此错误:

checked this site explaining the error,不适合我

this Whosebug question不相关

所以,为什么我会收到此错误,即使文件已创建,就地存在。

以上错误根源于 Ansible 配置,而不是具体的 vagrant。您提到您 运行ning vagrant provision 作为 root,这意味着相对路径 ~/.ssh/id_rsa.pub 将是 /var/root/.ssh/id_rsa.pub。我会重新审视为什么你对 运行 vagrant provision 使用 sudo,因为这是不正确的。

我是由于多年来安装的许多不同的用户访问权限不匹配,我不得不重新安装 mac os-x,之后一切正常。

Vagrant 没有请求 sudo,在设置 Virtualbox 期间没有失败。

一切都很顺利。