Question:
I am having a very strange problem with git
and github
. When I try and push, I am getting:
1 2 3 |
git push -u origin master ERROR: Repository not found. fatal: The remote end hung up unexpectedly |
I added the remote:
1 |
git remote add origin git@github.com:account-name/repo-name.git |
Any ideas?
Answer:
If you use Git on Windows, try to clear your credentials:
- Locate “credential manager” (should be in your Control Panel)
- Remove all credentials related to GitHub

If you are using MAC OS
Open Keychain Access on your mac, choose “All Items” category and search for git. Delete all results found.
Now go to the terminal and try to push again. The terminal will ask for username and password. Enter the new relevant credentials and that’s it!