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.
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.
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.
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With