【发布时间】:2021-01-20 09:05:11
【问题描述】:
我是编程新手,很抱歉这些愚蠢的问题(如果它们可能发生的话)。
我正在尝试使用带有 VPS (https://www.digitalocean.com/community/tutorials/how-to-set-up-automatic-deployment-with-git-with-a-vps) 的 git 设置自动部署。
我做了所有的事情,包括git remote add live ssh://user@mydomain.com/var/repo/site.git
但是,当我尝试git push live master 时,我收到以下错误:
ssh: connect to host mydomain.com port 22: Connection refused
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我该如何解决这个问题?
【问题讨论】:
-
问题出在错误信息中:
ssh: connect to host mydomain.com port 22无法访问存储库。mydomain.com应该是什么? -
它应该是我网站的域名,但是我错误地设置了错误的“用户”和“mydomain.com”。我现在不知道怎么改。
标签: git web-deployment vps