Homestead Vagrant坚持SSH连接

时间:2017-02-23 13:24:06

标签: laravel vagrant homestead

当我尝试在我的MacBook Pro(OS X 10.12.3)上启动Laravel Homestead时,它会陷入困境:

var request = require('request');
var magic = {
    jpg: 'ffd8ffe0',
    jpg1: 'ffd8ffe1',
    png: '89504e47',
    gif: '47494638'
};
var options = {
  method: 'GET',
  url: 'https://assets.donaldjtrump.com/gallery/4749/screen_shot_2016-10-30_at_1.39.54_pm.png',
  encoding: null // keeps the body as buffer
};
request(options, function (error, response, body) {
  if(!error) {
     var magicNumberInBody = body.toString('hex', 0, 4);
     if (magicNumberInBody == magic.jpg || 
         magicNumberInBody == magic.jpg1 || 
         magicNumberInBody == magic.png ||
         magicNumberInBody == magic.gif) {
         console.log('Valid image');
     } else {
         console.log('Invalid Image', magicNumberInBody);
     }
  }
});

它最终会超时。

homestead-7: SSH address: 127.0.0.1:2222
homestead-7: SSH username: vagrant
homestead-7: SSH auth method: private key

这是我的流浪盒显示的内容:

This is what my Vagrant box displays

我的 Homestead.yaml

Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.

If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.

If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.

我正在使用VirtualBox 5.1.14运行Vagrant 1.9.1。

有谁知道问题可能是什么?

1 个答案:

答案 0 :(得分:0)