git拉仓库代码时报错:Host key for github.com has changed and you have requested strict checking. Host key verification failed. fatal: Could not read from remote repository.
解决步骤:
- 删除当前机器ip地址的key
ssh-keygen -R "当前机器IP地址"
MAC查看ip地址:MAC查看ip地址
2. 如果上述步骤报不存在该ip地址的key,可通过删除known_hosts文件
rm ~/.ssh./known_hosts
- 重新生成配置ssh key并配置到github上,参考:
如何配置ssh key