Repository Not Found when pushing to GitHub remote

git-push, github

Solution

Your remote address is, compared to what github tells you:

 git@github.com:seterr/messages.git    <== your remote
 git@github.com:septerr/messages.git   <== GitHub actual repo address

You forgot the '`p`' in `septerr`.

As mentioned in "GitHub pushing/pulling error", GitHub repo addresses are sensitive to typo or case.

Nick mentions in the comments:

I ran into an issue where I needed to change my repo address due to a change in GitHub username. Here's the code for it:

git remote set-url origin git@github.com:username/reponame.git 

This will set the remote name to origin with the GitHub username of username.

Problem

I created a repository on GitHub called 'messages' and a local repository with the same name. I am trying to push the files from my local repo to the remote but get this error: ERROR: Repository not found. fatal: The remote end hung up unexpectedly. I figured it was an authentication issue. And when I ran ``` ssh -T git@github.com ``` I did get a message indicating that my key did not work. So I added my ~/.ssh/github_rsa.pub to the SSH keys in my account on GitHub (deleted the one that already existed there) and ran the command again. This time I received a message saying - Hi septerr! You've successfully authenticated, but GitHub does not provide shell access. From what I read this seemed to be the expected message. So, I again tried the push. But received same error. Repository not found. ``` Swapnas-MacBook-Pro:messages sony$ git remote -v show origin git@github.com:seterr/messages.git (fetch) origin git@github.com:seterr/messages.git (push) Swapnas-MacBook-Pro:messages sony$ git push -u origin master ERROR: Repository not found. fatal: The remote end hung up unexpectedly ``` When I look at my repo on GitHub I see: Existing Git Repo? `cd existing_git_repo` `git remote add origin git@github.com:septerr/messages.git` `git push -u origin master` What could be wrong?

Original source

Related problems