git 致命:远程端意外挂断了上游获取

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9591294/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 06:34:26  来源:igfitidea点击:

fatal: The remote end hung up unexpectedly with a fetch upstream

gitgithub

提问by Cool Guy Yo

I am following the instructions on github for forking a repo but everything up to not including configure the remotes works. I am told to run the following code but git fetch upstream returns the following fatal: The remote end hung up unexpectedlyWhats causing this, and could someone explain what it means to configure the remotes.

我正在按照 github 上的说明进行分叉 repo,但不包括配置遥控器的所有内容都可以工作。我被告知运行以下代码,但 git fetch upstream 返回以下fatal: The remote end hung up unexpectedly导致此问题的原因,有人可以解释配置遥控器的含义。

$ cd Spoon-KnifeChanges the active directory in the prompt to the newly cloned "Spoon-Knife" directory
$ git remote add upstream git://github.com/octocat/Spoon-Knife.gitAssigns the original repo to a remote called "upstream"
$ git fetch upstream

采纳答案by Marvin Pinto

Why not just start fresh:

为什么不重新开始:

$ rm -rf Spoon-Knife
$ git clone git://github.com/octocat/Spoon-Knife.git
$ cd Spoon-Knife
$ git remote add upstream git://github.com/octocat/Spoon-Knife.git
$ git fetch upstream

As for the remote end hung up unexpectedlyerror, see thisStack Overflow question (among many) -- most likely reason is that your SSH keys weren't set up correctly.

至于remote end hung up unexpectedly错误,请参阅堆栈溢出问题(其中很多)——最可能的原因是您的 SSH 密钥设置不正确。