The authenticity of host ‘192.168.1.1 (192.168.1.1)’ can’t be established. 解决方法

今天在使用Git的时候,在服务器用www用户身份 执行拉取命令“sudo -u www git pull”报错如下:

The authenticity of host '192.168.1.1 (192.168.1.1)' can't be established.

中文翻译

无法建立主机“ 192.168.1.1(192.168.1.1)”的真实性。

 

原因分析:

这是因为在新生成密钥之后,在 .ssh文件夹中少了known_hosts文件。

 

解决方法

Are you sure you want to continue connecting (yes/no)? yes

这里填yes就好了。

此时选择yes回车之后便生成了缺少了的known_hosts文件;

 

再次执行上边的“sudo -u www git pull”命令,就ok了。

 

完整过程如下图:

The authenticity of host '192.168.1.1 (192.168.1.1)' can't be established.

    A+
发布日期:2019年11月29日 13:32:29  所属分类:Git
最后更新时间:2019-11-29 13:32:29
头像
  • ¥ 198.0元
  • 市场价:398.0元
  • ¥ 69.0元
  • 市场价:69.0元
  • ¥ 499.0元
  • 市场价:499.0元
  • ¥ 498.0元
  • 市场价:998.0元

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: