Report this

What is the reason for this report?

i how can i solve this error "Permission denied (publickey)." when i typed "git push live master" ???

Posted on February 11, 2017

i try to deploy my project on digitalocean hosting , i follow this link , http://www.refactoru.com/blog/setting-up-push-to-deploy-on-digitalocean every thing is ok , but when i typed "git push live master " on git bash on my local repo i get error $ git push live master Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. i searched for this problem and tried many solution but it didnot work, notes : i work on windows OS , so i can connect to ubuntu digitalocean server with putty without any problem … i know the problem related with authentication , but i don’t know how i solve it ??? plz help me… thanks



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.

Hello there.

It should be correct. In case of Hooks, this is how you want to do it. First I would verify, do you have access to Ubuntu Server from Git Bash. To do so, use ssh command:

  1. ssh root@droplet-ip

If that doesn’t show error (for example Permission denied (publickey).), that means this part is OK. However, if error appears, make sure you have configured correctly SSH key on server and on client.

In case this is not a problem, make sure you created repository on Ubuntu Server correctly. You could use How To Use Git Hooks To Automate Development and Deployment Tasks instead of DO tutorial you linked in answer, as this is newer.

For The access Denied Issues And git username , password

I had this problem too but managed to solve it, the error is that ur computer has saved a git username and password so if you shift to another account the error 403 will appear. Below is the solution For Windows you can find the keys here:

control panel > user accounts > credential manager > Windows credentials > Generic credentials

Next remove the Github keys.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.