我刚刚在我的 Git Bash 中为我想推送到 GitHub 的应用程序生成了 ssh key 。我添加了代理和代理身份,复制了 key 并在我的 GitHub 帐户中创建了一个新的 SSH key 。当我尝试运行 $ssh -T github@github.com
时,我收到一条错误消息,内容为 "ssh_exchange_identification: read: Connection reset by peer"
。我之前看到过这个问题,但与 GitHub 没有直接关系(如果我错了请纠正我)。我在我的 User\.ssh 文件夹中看到了我的 id_ras 和 id_rsa.pub 文件。导致此错误消息的问题可能是什么?注意:我在我的办公室内运行它,想知道这是否可能是由办公室网络防火墙引起的?
最佳答案
首先 ssh -T github@github.com
不会工作
ssh -T git@github.com
会
第二,如果你的办公室有任何代理/防火墙,应该阻止传出的 ssh 连接。
使用 https URL(带凭证缓存)是您的最佳选择。
关于GitHub 错误 - "ssh_exchange_identification: read: Connection reset by peer",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46798348/