By SquareNet
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!
Accepted Answer
Hello @squarenet
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-id
command to do that).~/.ssh/authorized_keys
file (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!
Heya,
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.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.