Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/kotlin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vagrant 新增地块后家园流浪者破碎_Vagrant_Homestead - Fatal编程技术网

Vagrant 新增地块后家园流浪者破碎

Vagrant 新增地块后家园流浪者破碎,vagrant,homestead,Vagrant,Homestead,我的流浪汉包厢出了一个奇怪的问题。我对流浪汉不太熟悉。只是想看看是否有人已经解决了同样的问题,或者至少可以给我一些启示。提前感谢您的帮助 在我添加了一个新的laravel站点之前,该框一直运行良好。(我没有更改vagrant文件中的任何内容。只添加了新站点的站点映射)在composer安装后,我尝试重新加载vagrant box。然后我得到的错误是: Bins:homestead Leo$ vagrant reload /Applications/MAMP/htdocs/homestead/ve

我的流浪汉包厢出了一个奇怪的问题。我对流浪汉不太熟悉。只是想看看是否有人已经解决了同样的问题,或者至少可以给我一些启示。提前感谢您的帮助

在我添加了一个新的laravel站点之前,该框一直运行良好。(我没有更改vagrant文件中的任何内容。只添加了新站点的站点映射)在composer安装后,我尝试重新加载vagrant box。然后我得到的错误是:

Bins:homestead Leo$ vagrant reload
/Applications/MAMP/htdocs/homestead/vendor/laravel/homestead/scripts/homestead.rb:178:in `+': no implicit conversion of nil into String (TypeError)
    from /Applications/MAMP/htdocs/homestead/vendor/laravel/homestead/scripts/homestead.rb:178:in `block (2 levels) in configure'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/plugins/kernel_v2/config/vm_provisioner.rb:72:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/plugins/kernel_v2/config/vm_provisioner.rb:72:in `add_config'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/plugins/kernel_v2/config/vm.rb:338:in `provision'
    from /Applications/MAMP/htdocs/homestead/vendor/laravel/homestead/scripts/homestead.rb:177:in `block in configure'
    from /Applications/MAMP/htdocs/homestead/vendor/laravel/homestead/scripts/homestead.rb:166:in `each'
    from /Applications/MAMP/htdocs/homestead/vendor/laravel/homestead/scripts/homestead.rb:166:in `configure'
    from /Applications/MAMP/htdocs/homestead/Vagrantfile:30:in `block in <top (required)>'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/config/v2/loader.rb:37:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/config/v2/loader.rb:37:in `load'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/config/loader.rb:113:in `block (2 levels) in load'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/config/loader.rb:107:in `each'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/config/loader.rb:107:in `block in load'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/config/loader.rb:104:in `each'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/config/loader.rb:104:in `load'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/vagrantfile.rb:28:in `initialize'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/environment.rb:746:in `new'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/environment.rb:746:in `vagrantfile'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/environment.rb:492:in `host'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/environment.rb:214:in `block in action_runner'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/action/runner.rb:33:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/action/runner.rb:33:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/environment.rb:479:in `hook'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/environment.rb:728:in `unload'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/bin/vagrant:130:in `ensure in <main>'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/bin/vagrant:130:in `<main>'
试图销毁6634808,但再次出错:

Bins:~ Leo$ vagrant destroy 6634808
/Applications/MAMP/htdocs/homestead/vendor/laravel/homestead/scripts/homestead.rb:4:in `configure': undefined method `[]' for nil:NilClass (NoMethodError)
    from /Applications/MAMP/htdocs/homestead/Vagrantfile:30:in `block in <top (required)>'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/config/v2/loader.rb:37:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/config/v2/loader.rb:37:in `load'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/config/loader.rb:113:in `block (2 levels) in load'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/config/loader.rb:107:in `each'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/config/loader.rb:107:in `block in load'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/config/loader.rb:104:in `each'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/config/loader.rb:104:in `load'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/vagrantfile.rb:28:in `initialize'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/environment.rb:746:in `new'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/environment.rb:746:in `vagrantfile'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/environment.rb:669:in `machine'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/plugin/v2/command.rb:147:in `block in with_target_vms'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/plugin/v2/command.rb:201:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/plugin/v2/command.rb:201:in `block in with_target_vms'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/plugin/v2/command.rb:183:in `each'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/plugin/v2/command.rb:183:in `with_target_vms'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/plugins/commands/destroy/command.rb:30:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/cli.rb:42:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/environment.rb:308:in `cli'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/bin/vagrant:127:in `<main>'

SSH密钥身份验证失败可能是问题所在

您应该编辑Homestead.yaml文件。在这个文件中,您可以配置公共SSH密钥的路径,以及希望在主机和Homestead虚拟机之间共享的文件夹

没有SSH密钥吗?在Mac和Linux上,通常可以使用以下命令创建SSH密钥对:

ssh-keygen -t rsa -C "you@homestead"
在Windows上,您可以安装Git并使用Git附带的Git Bash shell发出上述命令。或者,您可以使用腻子和腻子


创建SSH密钥后,在homestad.yaml文件的authorize属性中指定密钥的路径。

您是否有
homestad.yaml
文件?您好,Frédéric Henri!谢谢你抽出时间。刚刚添加了homestad.yaml文件。@FrédéricHenri我发现了这个问题。网站地图部分有一个打字错误。谢谢你的帮助!祝你有愉快的一天!
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
hostname: homestead
name: homestead
provider: virtualbox

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:
    - map: "/Applications/MAMP/htdocs/homestead/code"
      to: "/home/vagrant/Code"

sites:
    - map: 
      to: "/home/vagrant/Code/co-orion/public"
    - map: dev.lara.com
      to: "/home/vagrant/Code/lara/public"
    - map: dev.lara53.com
      to: "/home/vagrant/Code/laravel53/public"
    - map: dev.es.com
      to: "/home/vagrant/Code/es"
    - map: dev.laradminlte.com
      to: "/home/vagrant/Code/laradminlte/public"
    - map: dev.lavalite.com
      to: "/home/vagrant/Code/lavalite/public"
databases:
    - orion

# blackfire:
#     - id: foo
#       token: bar
#       client-id: foo
#       client-token: bar

ports:
#     - send: 50000
#       to: 5000
    - send: 62000
      to: 9200
      protocol: tcp
ssh-keygen -t rsa -C "you@homestead"