$ git push origin master
Warning: Permanently added the RSA host key for IP address '192.30.252.129' to t
he list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
------or------
$ git push origin master
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
It is caused by the user not adding his user.name and user.email. Sometimes even I does that with git config, it still appears. I have to manually added them to the git config file.
Sometimes it appears if I used git url in the git remote. After I changed the git url to the https url, it works.