【问题标题】:Vagrant: missing file id_rsaVagrant:缺少文件 id_rsa
【发布时间】:2016-05-30 06:24:33
【问题描述】:

我正在使用带有宅基地的 windows,我试图在命令行上输入 vagrant,但我收到了这个错误:

C:/www/Homestead/scripts/homestead.rb:106:in read': No such file or directory @ rb_sysopen - C:/Users/Niall/.ssh/id_rsa (Errno::ENOENT) from C:/www/Homestead/scripts/homestead.rb:106:inblock (2 个级别) in configure' 来自 C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/kernel_v2/config/vm_provisioner.rb:72:in call' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/kernel_v2/config/vm_provisioner.rb:72:inadd_config' 来自 C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/kernel_v2/config/vm.rb:321:in provision' from C:/www/Homestead/scripts/homestead.rb:103:inblock in configure' 来自 C:/www/Homestead/scripts/homestead.rb:102:in each' from C:/www/Homestead/scripts/homestead.rb:102:inconfigure' 来自 C:/www/Homestead/Vagrantfile:20:in block in <top (required)>' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/v2/loader.rb:37:incall' 来自 C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/v2/loader.rb:37:in load' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/loader.rb:113:inblock (2 个级别) in load' 来自 C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/loader.rb:107:in each' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/loader.rb:107:inblock in load' 来自 C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/loader.rb:104:in each' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/loader.rb:104:inload' 来自 C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/vagrantfile.rb:28:in initialize' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/environment.rb:740:innew' 来自 C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/environment.rb:740:in vagrantfile' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/environment.rb:486:inhost' 来自 C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/environment.rb:208:in block in action_runner' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:33:incall' 来自 C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:33:in run' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/environment.rb:473:inhook' 来自 C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/environment.rb:722:in unload' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/bin/vagrant:177:inensure in ' 来自 C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/bin/vagrant:177:in `'

我在网上搜索,但我只能找到其他人问同样的问题但没有答案。这个错误是什么意思?我特别去了文件夹,确实没有名为 id_rsa 的文件。任何人都可以阐明如何纠正这个问题吗?

【问题讨论】:

    标签: vagrant homestead vagrant-windows


    【解决方案1】:

    您似乎需要生成一个 SSH 密钥?如果你使用 Git Bash,你可以通过输入命令 ssh-keygen -t rsa -C "your_email@example.com"(显然是你自己的电子邮件)来做到这一点。

    当它提示您保存密钥的位置时,只需按 Enter。密码也是可选的,只需按两次 Enter 即可获得空白密码。

    【讨论】:

    • 救命稻草!这应该添加到 Laravel 的安装文档中。
    • 甜蜜 - 永远不会猜到这一点。
    • 有用的答案,tks!
    • 注意:如果您在 Windows 上安装了 Cygwin(或 msysgit),您的 ssh 文件可能在其他地方,如下所示:授权:C:\dev\cygwin\home\myCYGWINusername\.ssh\id_rsa.pub键:- C:\dev\cygwin\home\myCYGWIN用户名\.ssh\id_rsa
    • 节省了我用头撞墙的时间!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-04-25
    • 2014-10-26
    • 2011-03-04
    • 2016-10-21
    • 2014-12-17
    • 2012-11-23
    • 2016-02-22
    相关资源
    最近更新 更多