Reputation: 101
I'm new to developing with GITHUB on a mac. I have created the SSH public and private key files and have the public key in the settings on git hub. I moved the files to the ~/.ssh folder on my mac.
The issue is that when I try to push to the remote branch, I get an access denied.
Jims-MacBook-Pro-2:romannumeralconverterAPI jrieck$ git push --set-upstream origin master
Enter passphrase for key '/Users/jrieck/.ssh/id_rsa':
Enter passphrase for key '/Users/jrieck/.ssh/id_rsa':
ERROR: Permission to jrieckPillarTechnology/ArabicToRomanNumeralAPI.git denied to deploy key
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
Jims-MacBook-Pro-2:romannumeralconverterAPI jrieck$
Any thoughts on the reason for the access denied error?
Upvotes: 2
Views: 151
Reputation: 76489
It sounds like you've set up your key as a deploy key, which are by default read-only. The idea behind a deploy key is that you can have an automated system use that key to access a specific repository for the purpose of deploying it to production. You can read more about why deploy keys are useful in the GitHub documentation.
If you're going to be using this key with your account as a human, not for an automated process, you probably want to remove it as a deploy key and instead add it as a key for your account, as described in the GitHub documentation for adding an SSH key. Note that you'll need to remove the key as a deploy key first; if you don't, you won't be able to add it as a key for your account.
Upvotes: 1