建立Homestead Laravel环境

时间:2018-01-17 17:48:15

标签: laravel vagrant homestead

我目前正在关注设置Homestead 2.0的Laracast视频,但是当我尝试命令~/.homestead $ homestead up时,我得到了这个:

/home/darren/.composer/vendor/laravel/homestead/scripts/homestead.rb:92:in `read': No such file or directory @ rb_sysopen - /home/darren/.ssh/id_rsa.pub (Errno::ENOENT)
    from /home/darren/.composer/vendor/laravel/homestead/scripts/homestead.rb:92:in `block in configure'
    from /usr/share/vagrant/plugins/kernel_v2/config/vm_provisioner.rb:72:in `add_config'
    from /usr/share/vagrant/plugins/kernel_v2/config/vm.rb:321:in `provision'
    from /home/darren/.composer/vendor/laravel/homestead/scripts/homestead.rb:90:in `configure'
    from /home/darren/.composer/vendor/laravel/homestead/Vagrantfile:20:in `block in <top (required)>'
    from /usr/lib/ruby/vendor_ruby/vagrant/config/v2/loader.rb:37:in `load'
    from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:113:in `block (2 levels) in load'
    from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:107:in `each'
    from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:107:in `block in load'
    from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:104:in `each'
    from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:104:in `load'
    from /usr/lib/ruby/vendor_ruby/vagrant/vagrantfile.rb:28:in `initialize'
    from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:706:in `new'
    from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:706:in `vagrantfile'
    from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:452:in `host'
    from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:179:in `block in action_runner'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/runner.rb:33:in `run'
    from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:439:in `hook'
    from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:688:in `unload'
    from /usr/bin/vagrant:176:in `ensure in <main>'
    from /usr/bin/vagrant:176:in `<main>'

1 个答案:

答案 0 :(得分:0)

啊,它告诉您Homestead.yaml中{{1}}所指定的SSH密钥丢失了。如果这是第一次在这台机器上使用SSH,您可能需要生成这些密钥。