the ECDSA host key for 'github.com' differs from the key for the IP address 日期:2023-07-28 人气:706 今天克隆项目之后,重新安装npm依赖包报错如下: ``` npm ERR! code 128 npm ERR! An unknown git error occurred npm ERR! command git --no-replace-objects ls-remote ssh://git@github.com/angular/web-animations-js.git npm ERR! Warning: the ECDSA host key for 'github.com' differs from the key for the IP address '20.205.243.166' npm ERR! Offending key for IP in /c/Users/SZLD-PC-109/.ssh/known_hosts:12 npm ERR! Matching host key in /c/Users/SZLD-PC-109/.ssh/known_hosts:23 npm ERR! Exiting, you have requested strict checking. npm ERR! Host key verification failed. npm ERR! fatal: Could not read from remote repository. npm ERR! npm ERR! Please make sure you have the correct access rights npm ERR! and the repository exists. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\SZLD-PC-109\AppData\Local\npm-cache\_logs\2023-07-28T07_27_03_040Z-debug-0.log ``` 网上搜索一下,原来是git证书过期了,需要删除重新添加一下 ``` ssh-keygen -R 20.205.243.166 ssh-keyscan github.com >> ~/.ssh/known_hosts ``` ### 鸣谢 - [后除](https://blog.mazey.net/3284.html) - [简书**overhaha**](https://www.jianshu.com/p/b255f743eb8b) 标签: 上一篇:七棵菜表单快速开发平台二次开发步骤 下一篇:GB/T 18894-2016——电子文件归档与管理规范 随便看看 2025-09-18 七棵菜表单快速开发平台二次开发步骤 2025-09-12 手动更新composer包 2025-08-25 blender4.5实现平面投影切割 2025-08-22 blender4.5.1操作说明 2025-08-19 查看composer所有依赖的 PHP 版本要求 留言