我正在运行Laravel Vagrant Homestead,我决定清理我的所有项目,并将我的主要项目文件夹的位置从我的桌面移动到我的C:/
只是为了让事情更有条理。当我启动我的VM时,它无法进行身份验证。
==> default: Checking if box 'laravel/homestead' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 80 => 8000 (adapter 1)
default: 3306 => 33060 (adapter 1)
default: 5432 => 54320 (adapter 1)
default: 22 => 2222 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection timeout. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
我已经按照几个步骤检查了Homestead.yaml
中的ssh密钥路径,看起来一切正常。
我跑了vagrant ssh-config
:
$ vagrant ssh-config
Host default
HostName 127.0.0.1
User vagrant
Port 2222
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentityFile C:/Users/David/.vagrant.d/insecure_private_key
IdentitiesOnly yes
LogLevel FATAL
并编辑insecure_private_key
以匹配我自己(我在某处看到了答案),但无济于事。
这是我的Homestead.yaml
(已修改为删除网站名称):
ip: "192.168.10.10"
memory: 2048
cpus: 1
authorize: C:/Users/David/.ssh/id_rsa.pub
keys:
- C:/Users/David/.ssh/id_rsa
folders:
- map: C:/Code/projects/website
to: /home/vagrant/projects/website
sites:
- map: website.app
to: /home/vagrant/projects/website/public
variables:
- key: APP_ENV
value: local
我保证我的ssh密钥的路径没有被修改。在清理VM上的项目并将我的主代码文件夹移动到C:/
并进行重新映射后,我才开始遇到此问题。
答案 0 :(得分:2)
根据您的日志,VM已启动。只是Vagrant不能通过SSH。
很可能你搞乱了VM中的authorized_keys(〜。/ ssh / authorized_keys)
保持流浪者不变,启动另一个命令提示符。
从剪贴板中的此站点临时复制密钥。
https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub
使用putty进入SSH。
putty vagrant@127.0.0.1 -p 2222
输入以下内容:
echo" - 从剪贴板粘贴 - " > ./authorized_keys
退出putty
输入Vagrant reload 注意它会检测到密钥不安全并自动注入新密钥。
你现在应该是Vagrant。
HTH。
答案 1 :(得分:0)
当我长时间没有使用using System;
using Android.App;
using Android.Content.PM;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
using ImageCircle.Forms.Plugin.Droid;
using Xamarin.Forms.Platform.Android;
namespace XamarinFormsDemo.Droid
{
[Activity(Label = "XamarinFormsDemo", Icon = "@drawable/recordsicon", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
public class MainActivity : AndroidActivity
{
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
global::Xamarin.Forms.Forms.Init(this, bundle);
OxyPlot.Xamarin.Forms.Platform.Android.PlotViewRenderer.Init();
LoadApplication(new App());
ImageCircleRenderer.Init();
}
}
}
时,就发生了这种情况。
然后我用以下内容更新了该框:
homestead
然后出现上述问题。
最容易做的事情就是对宅基地进行破坏,并将事情再次提起来。您的配置将保留在vagrant box add laravel/homestead
~/.homestead/Homestead.yml