I have followed the tutorial
But I cannot get it to work I keep getting the following message
git push production master root@MYSITE.com: Permission denied (publickey). fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $200 of credit to try our products over 60 days!
It seems you’re experiencing issues with git push and receiving a
Permission denied (publickey)error message. This issue is generally due to the server not recognizing your SSH key.
To resolve this issue, please follow these steps:
ssh-copy-idcommand to do that).
~/.ssh/authorized_keysfile (600) are correct on the server.
For more information on working with SSH keys, check out this DigitalOcean guide on Adding SSH Keys.
Hope that this helps!
From the error provided, it seems like your public key doesn’t have access to your github repository.
You’ll need to add your server’s public key to your repository in order for you to be able to access it from the server.