Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fetching from upstream github repository fails by hanging up

Tags:

git

github

Why is my git fetch failing with a:

fatal: The remote end hung up unexpectedly

I am a collaborator on a private project and have successfully forked the project. I have setup a remote using the github example:

git remote add upstream git://github.com/{upstream owner}/{upstream project}.git

I can see the remote was added using "git -v show -n upstream"

Fetch URL: git://github.com/{upstream owner}/{upstream project}.git
Push  URL: git://github.com/{upstream owner}/{upstream project}.git

I know my ssh key works:

ssh -T [email protected]
Hi miketempleman! You've successfully authenticated, but GitHub does not provide shell access.

yet when I try to update my local repository from the upstream repository:

mike@ununtu-11:~/{directory}$ git fetch upstream
fatal: The remote end hung up unexpectedly

Apologies for such a stupid question.

like image 629
Mike T Avatar asked Apr 13 '12 18:04

Mike T


People also ask

How do I fix fatal the remote end hung up unexpectedly in git?

Solution. To solve the issue, change the settings of your buffer so that you have enough space available. You can increase the buffer value up to 2000000000.

What does fetch upstream mean in github?

The term upstream and downstream refers to the repository. Generally, upstream is from where you clone the repository, and downstream is any project that integrates your work with other works.

Why git pull is not working?

Not enough information for Git to work with As the error message states: you will have to let Git know what remote branch it should use to track with the current local branch. Doing this will allow you to simply run git pull and Git will know where to bring new data from.

What is an upstream repository Github?

In the git world, upstream refers to the original repo or a branch. For example, when you clone from Github, the remote Github repo is upstream for the cloned local copy.


1 Answers

I think the git:// read-only URIs are not available for private repos so that they are not world-readable (i.e. you can only get at the repo if you are authorized).

Try with a different remote URI:

git remote set-url upstream [email protected]:{upstream owner}/{upstream project}.git

or, alternatively with HTTPS:

git remote set-url upstream https://{your username}@github.com/{upstream owner}/{upstream project}.git
like image 113
Abe Voelker Avatar answered Nov 10 '22 08:11

Abe Voelker