Bentley4 Bentley4 - 1 month ago 17
Git Question

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

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 git@github.com: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 git@github.com
) 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 git@github.com:githubaccountname/hello_git.git (fetch)
origin git@github.com:githubaccountname/hello_git.git (push)


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


Answer

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!