Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitHub: ERROR: Repository not found. fatal: The remote end hung up unexpectedly (different from similar posts apparently)

Tags:

git

github

I created a directory, hello_git. In this directory I created a file, hello_git.py, which prints out a "Hello git!" message.

Then I made hello_git my current directory in the terminal and entered the following commands one after another in that directory:

git init
git add hello_git.py
git commit -m 'first commit'
git remote add origin [email protected]:githubaccountname/hello_git.git

When I enter the command git push origin master I get asked:

Enter passphrase for key '/home/myusername/.ssh/id_rsa':

When I enter my passphrase (which authenticates successfully using ssh -T [email protected]) I get this:

ERROR: Repository not found.
fatal: The remote end hung up unexpectedly

I don't know if this helps, but:

git remote -v

returns:

origin    [email protected]:githubaccountname/hello_git.git (fetch)
origin    [email protected]:githubaccountname/hello_git.git (push)

I have looked into answers of similar posts, but nothing seems to work:

  • Fatal: The remote end hung up unexpectedly while pushing to Git repository

  • GitHub ERROR: Repository not found. fatal: The remote end hung up unexpectedly

  • How do I resolve this issue of preventing push to origin wrt. GitHub?

like image 282
Bentley4 Avatar asked Jun 06 '12 20:06

Bentley4


People also ask

How do you solve fatal the remote end hung up unexpectedly?

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.

Why is Repository not found?

Error: Repository not found. If you see this error when cloning a repository, it means that the repository does not exist or you do not have permission to access it.


2 Answers

Eric has already given the best answer for this question in the case that the repository does not exist, but I want to point out that:

The response pair of "Repository not found. / remote end hung up unexpectedly" is also given by GitHub when the repository does exist, but the user does not have permission to push to it.

If you're absolutely certain that the repository already exists on GitHub, make sure the account you're using has permission to push to that repository.

like image 115
jlbang Avatar answered Oct 23 '22 19:10

jlbang


The error message says it all

ERROR: Repository not found.

Is there a Git repository where you're looking?

You need to create the repository on GitHub first. It can't find the repository because it doesn't exist yet!

like image 22
Eric Avatar answered Oct 23 '22 20:10

Eric