我一直在尝试在我的PC(Ubuntu20.04)上使用SSH(git克隆)连接GitHub。
0. Installed SSH, git
1. Created SSH-key under ~/.SSH/
2. Submit my id_rsa.pub key to GitHub
3. SSH -T git@github.com <- Did not work
4. SSH -vT git@github.com <- Didn't work
6. SSH git@github.com <- It worked
7. git clone ~ <- Did not work当我执行SSH -T git@github.com时,它不工作。
Error Messages:
Connection to github.com closed by remote host.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.终端显示"Connection to github.com closed by remote host“
但是当我尝试showed时,它工作了,终端显示Hi,git@github.com =。
然后我尝试了git clone (我的GitHub仓库),但是终端提示“请确保你有正确的访问权限~”。
我的SSH连接有什么问题?
发布于 2021-01-22 16:07:45
注意(对于其他读者)路径是区分大小写的(除非您是在Windows上),这意味着SSH密钥在~/.ssh下,而不是~/.SSH下。
URL应该是:
git clone git@github.com:<user>/<reponame>同样,区分大小写:仔细检查远程存储库的URL。
https://stackoverflow.com/questions/65837743
复制相似问题