流浪汉:缺少文件id_rsa

时间:2016-02-18 07:39:14

标签: vagrant homestead vagrant-windows

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

  

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:in块(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:in add_config'           来自C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/kernel_v2/config/vm.rb:321:在provision' from C:/www/Homestead/scripts/homestead.rb:103:in块中的配置'           来自C:/www/Homestead/scripts/homestead.rb:102:in each' from C:/www/Homestead/scripts/homestead.rb:102:in configure'           来自C:/ www / Homestead / Vagrantfile:20:block in <top (required)>' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/v2/loader.rb:37:in来电'           来自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:in块(2级)加载'           来自C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/loader.rb:107:在each' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/loader.rb:107:in块中加载'           来自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:in load'           来自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:in new'           来自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:in host'           来自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:in call'           来自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:in hook'           来自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:in确保'           来自C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/bin/vagrant:177:in''

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

1 个答案:

答案 0 :(得分:20)

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

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