Fetching from upstream github repository fails by hanging up

git, github

Solution

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 git@github.com:{upstream owner}/{upstream project}.git

or, alternatively with HTTPS:

git remote set-url upstream https://{your username}@github.com/{upstream owner}/{upstream project}.git

Problem

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 git@github.com 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.

Original source