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

背景,在服务器用www用户身份 执行拉取命令报错

sudo -u www git pull

 

原因分析:

在新生成密钥之后,在.ssh文件夹中少了known_hosts文件

解决办法:

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

这里填yes就好了。
此时选择yes回车之后便生成了缺少了的known_hosts文件

再次执行上边的命令。就ok了

完整过程如下图

 

posted @ 2019-11-22 20:42  依然范儿特西  阅读(4261)  评论(0编辑  收藏  举报