I am the owner for the "project" repo, but somehow I am not able to push to it.
user@none ~/rails_projects/project $ git remote -v
origin [email protected]:user/project.git (fetch)
origin [email protected]:user/project.git (push)
Here is authentication check:
user@none ~/rails_projects/project $ ssh -T [email protected]
Hi user/project! You've successfully authenticated, but GitHub does not provide shell access.
Push attempt:
user@none ~/rails_projects/project $ git push origin qa
ERROR: The key you are authenticating with has been marked as read only.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Any idea how to fix this error?
It seems likely that you have more than one SSH key, and the key that's being presented is a deploy key for the repository rather than one of your account's keys with write permissions. There are two ways of dealing with this:
Remove all keys from your SSH agent, and re-add just the correct account key.
ssh-add -D
ssh-add /path/to/correct/key
Use HTTPS instead of SSH. You can do this easily by changing the remote URL for origin to use the HTTPS scheme instead of SSH.
One or the other of these should work, unless you are simply presenting the wrong credentials altogether.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With