Cause: the change of remote git address
Platform:MAC
Warning Info:
Warning: the ECDSA host key for 'xx.xxx.com' differs from the key for the IP address 'xx.xx.xx.xx'
Offending key for IP in /Users/username/.ssh/known_hosts2:2
Solution:
1) cd ~/.ssh
2) vim config
3) Then edit this config file:
Host xx.xxx.com
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null
LogLevel=quiet
4) :wq
Reference:
- https://serverfault.com/questions/423019/known-hosts-ecdsa-host-key-multiple-domains-on-one-ip
- http://blog.csdn.net/zhangp80/article/details/6889568
- http://stackoverflow.com/questions/9299651/git-says-warning-permanently-added-to-the-list-of-known-hosts
In summary:
This solution really save my day!
Also you can try this way : “ssh-keygen -R <yourhostname>”
Windows platform may refer to this workaround as well.