需要将GIT存储库克隆到远程服务器
我需要通过SSH将GIT存储库克隆到远程服务器。我试着用传统的方式,使用需要将GIT存储库克隆到远程服务器,git,github,git-clone,git-repo,Git,Github,Git Clone,Git Repo,我需要通过SSH将GIT存储库克隆到远程服务器。我试着用传统的方式,使用 git clone git@github.xyz.com:username/repository.git 上面给了我 fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. 1) Repo存在,我为测试目的创建了Repo 2)
git clone git@github.xyz.com:username/repository.git
上面给了我
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
1) Repo存在,我为测试目的创建了Repo
2) 这是一个公共回购。首先,如果它是一个公共存储库,您应该能够通过https URL克隆它
git clone https://github.xyz.com/username/repository.git
其次,要了解SSHURL失败的更多原因,请将GIT\u SSH\u命令设置为SSH-v
然后再次克隆,并检查错误消息
Assh-Tvgit@github.xyz.com
应打印您的姓名。如果不是,如评论所述,您需要在github.xyz.com上的配置文件中注册您的~/.ssh/id_rsa.pub
公共ssh密钥。如果是公共repo,为什么要隐藏其URL?听起来您可能需要添加ssh密钥,很可能是ssh密钥问题。以防万一,请确保您可以从远程服务器访问github。在这里,他们设法解决了一些非常相似的问题: