By Shola
Hello, guys.
It is my first time deploying by myself. So I am following this tutorial: https://devmarketer.io/learn/deploy-laravel-5-app-lemp-stack-ubuntu-nginx/. I am having an issue when pushing to the server. I receive the error below when I run “git push production master”. Any idea?
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Thank you in advance. Shola
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!
Hello Shola,
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
This simply means that you don’t have the right permissions to ssh into your droplet. As it looks, you are missing a private ssh key. Have you setup your droplet with an RSA key? This private ssh key also has to be available on the development server before you can push things.
If you have multiple production servers or servers secured with a SSH key, you could use a ssh configuration like this:
Host gitserv
Hostname remote.server.com
IdentityFile ~/.ssh/id_rsa.github
IdentitiesOnly yes # see NOTES below
I hope this is helpfull. If you need anything else don’t hesistate to ask me.
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.