【发布时间】:2018-10-29 19:34:19
【问题描述】:
当使用 git clone 时,我遇到了一个错误。 这是命令和错误信息。
[user@linux]$ git clone git@github.com:username/repertory.git
FATAL: failed to begin relaying via HTTP.
ssh_exchange_identification: Connection closed by remote host
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
除了 git@github,git clone https://...... 和 git clone git://...... 都很好用。所以我猜ssh协议有问题,然后我检查了ssh。
[user@linux]$ ssh -T git@github.com
Hi username! You've successfully authenticated, but GitHub does not provide shell access.
看来我可以通过ssh协议正常连接到github了。但是通过 ssh 进行 git clone 有什么问题呢?
【问题讨论】:
-
您似乎在
.gitconfig中使用代理配置。请发布相关配置(您可以省略任何密码)。