How to fix: WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
5c:fb:f7:1c:33:e1:cf:ac:a7:ab:42:59:d3:7c:57:d2.
Please contact your system administrator.
Add correct host key in /Users/username/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/username/.ssh/known_hosts:9
RSA host key for xx.xx.xx.xx has changed and you have requested strict checking.
Host key verification failed.

One reason for this to happen can be that you changed the machine, although it has the same IP address. It happened to me with DigitalOcean.

Solution: Regenerate the key

ssh-keygen -R xx.xx.xx.xx

(note that username and ip address have been replaced by dummy values)

GIT and GitHub: how to avoid entering credentials every time

Do you have some repos and have to enter the credentials everytime you connect to github? the solution is given here:

http://stackoverflow.com/questions/6565357/git-push-requires-username-and-password#answer-6565661

It is caused because you referred to the https instead of the git address. So you will have to do the following:

git remote set-url origin git@github.com:username/repo.git