Question

How To Set Up Automatic Deployment with Git with a VPS

Posted March 11, 2020 99 views
GitDigitalOceanDeploymentAutomated Setups

As I was following through the tutorial on the same topic (https://www.digitalocean.com/community/tutorials/how-to-set-up-automatic-deployment-with-git-with-a-vps), I successfully established a git repo at the vps, I even added remote live by git remote add live ssh://myuser@mydomain.com/var/repo/site.git I already have local git setup I regularly use git with my team.

But when I used the command git push live vps
The following happened

The authenticity of host 'mydomain.com (1xx.yy.www.zz3)' can't be established.
ECDSA key fingerprint is SHA256:yXzYFN698CZQgNHzb8jg4CQCIJBhzD34AFebkZ0/63Q.
Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'mydomain.com,1xx.yy.www.zz3' (ECDSA) to the list of known hosts.

myuser@mydomain.com.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I was kind of expecting it to come since there is no step I can see where I may put my private ssh key. Please note that I am using putty with ssh key to communicate with my server and using windows cmd to issue git commands
git remote add live ssh://myuser@mydomain.com/var/repo/site.git
and
git push live vps

from my local system.

Please let me know where I am missing something.

edited by MattIPv4
0 answers
Submit an answer

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!