继续浏览精彩内容
慕课网APP
程序员的梦工厂
打开
继续
感谢您的支持,我会继续努力的
赞赏金额会直接到老师账户
将二维码发送给自己后长按识别
微信支付
支付宝支付

解决Vagrant报错Warning: Authentication failure. Retrying问题

MYYA
关注TA
已关注
手记 474
粉丝 77
获赞 330

vagrant报错,提示Warning: Authentication failure. Retrying...,重试多次后失败, 并且运行完毕后没有共享文件夹

提示信息如下:

default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2200
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
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.


通过上面的错误信息,我们发现并不是config.vm.boot_timeout的问题, 因为我们已经可以连接虚拟机了。 Authentication failure说明认证失败, 猜测可能是ssh默认登陆问题, 简单的处理方法:


在Vagrantfile配置文件中添加了两行代码,使用明文用户名密码

注意: 如果你改过vagrant的密码,那么请填写改后的正确密码。

config.ssh.username = "vagrant"
config.ssh.password = "vagrant"

保存


vagrant reload


发现问题解决啦!证明我的猜测是对的

原文来源:https://m.pythontab.com/article/1160


打开App,阅读手记
0人推荐
发表评论
随时随地看视频慕课网APP