I have a public key file associated with my github account. On my computer, all git repositories use that file when I use git push. One repository, however, is broken and I cannot push anything. The error I get:
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Since the other repositories work, there must be some problem with using the correct RSA file. How do I set the repository to use correctly the .ssh/id_rsa.pub when connecting to GitHub? This is my list of "remotes":
github https://github.com/USERNAME/PROJECT-NAME.git (fetch)
github https://github.com/USERNAME/PROJECT-NAME.git (push)
origin [email protected]:USERNAME/PROJECT-NAME.git (fetch)
origin [email protected]:USERNAME/PROJECT-NAME.git (push)
When pushing using origin, I need to use the RSA file.