简体   繁体   English

服务器上的Git克隆并自动拉

[英]Git clone on server and auto pull

i have an existing git repository i want to clone it on google compute server. 我有一个现有的git存储库,我想在Google计算服务器上克隆它。 the first thing i need to do is getting a clone on server of existing repo, but when i run the git clone it shows this error 我要做的第一件事是在现有存储库的服务器上获取克隆,但是当我运行git clone时,它会显示此错误

#git clone ssh://git@github.com:USER/REPO.git .
Initialized empty Git repository in /home/PATH/public_html/.git/
ssh: Could not resolve hostname github.com:USER: Name or service not known
fatal: The remote end hung up unexpectedly

can somebody help me resolve this issue and after i get a clone i need it to auto pull when i push changes to github 有人可以帮我解决这个问题吗,当我得到克隆后,当我将更改推送到github时,我需要它自动拉

PS: i have also tried to init a new repository PS:我也尝试过建立一个新的存储库

It seems you have not added your ssh key to the server. 似乎您尚未将ssh密钥添加到服务器。 After you add it, the server will ask you to accept the host as a recognised host for all future requests. 添加后,服务器将要求您接受该主机作为所有将来请求的公认主机。 Until then github.com will be an unrecognised host. 在此之前, github.com将是无法识别的主机。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM