GitHub->';远端意外挂断';

GitHub->';远端意外挂断';,github,Github,我试图将一个项目(印花布)推送到GitHub,但遇到了一个错误。我已通过ssh连接成功登录,并收到了通常的响应: Ryan@RYANLAPTOP-PC /C/inetpub/wwwroot/Calico (master) $ ssh git@github.com Enter passphrase for key '/c/Users/Ryan/.ssh/id_rsa': Hi rossryan! You've successfully authenticated, but GitHub does

我试图将一个项目(印花布)推送到GitHub,但遇到了一个错误。我已通过ssh连接成功登录,并收到了通常的响应:

Ryan@RYANLAPTOP-PC /C/inetpub/wwwroot/Calico (master)
$ ssh git@github.com
Enter passphrase for key '/c/Users/Ryan/.ssh/id_rsa':
Hi rossryan! You've successfully authenticated, but GitHub does not provide shel
l access.
Connection to github.com closed.
但是,我在尝试推送代码时仍收到错误:

Ryan@RYANLAPTOP-PC /C/inetpub/wwwroot/Calico (master)
$ git push -u github master
The server's host key is not cached in the registry. You
have no guarantee that the server is the computer you
think it is.
The server's rsa2 key fingerprint is:
ssh-rsa 2048 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48
Connection abandoned.
fatal: The remote end hung up unexpectedly
我相信我已经相当忠实地遵循了网站上的说明,在正确的区域用“GitHub”代替“origin”(origin显然已经定义好了,所以我使用了不同的名称)。我已经就这个问题向GitHub发送了电子邮件,但没有收到任何回复

有人有其他想法吗

编辑:

git remote-v的输出:

Ryan@RYANLAPTOP-PC /C/inetpub/wwwroot/Calico (master)
$ git remote -v
github  git@github.com:rossryan/Calico.git (fetch)
github  git@github.com:rossryan/Calico.git (push)
origin  C:/inetpub/wwwroot/Calico/ (fetch)
origin  C:/inetpub/wwwroot/Calico/ (push)
在使用putty(而不是msysgit附带的打包openssh)时发生了这个错误。我认为这不是你的情况

是关于同样的错误,并建议建立ssh连接,而您确实这样做了(并且它没有建议将
github
添加到
$HOME/ssh/known_hosts
文件中),因此这也不是问题所在

您需要检查的是:

  • 为什么您要使用
    github
    而不是默认名称“
    origin
    ”(您是否真的添加了名为“github”的远程(上游)回购协议?)
  • 远程名称“github”后面的确切地址。正确的推送地址应为(发件人):
    • ssh URL
      git@github.com:user/repo.git
    • 或者像
      https://user@github.com/user/repo.git

git remote-v的输出是什么?我相信我添加了一个名为“github”的repo。上面的编辑中包含了更多信息。@user978122等等,为什么“
origin
”是本地repo的地址?你的远程
github
应该很好。我想
$HOME/ssh/known_hosts
确实存在,对吗?