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?
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.
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.
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.
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!
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