I\'ve a repository moodle on my Github account which I forked from the official repository.
I then cloned it on my local machine. It worked
I faced the same problem when I renamed my repository on GitHub. I tried to push at which point I got the error
fatal: 'origin' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
I had to change the URL using
git remote set-url origin ssh://git@github.com/username/newRepoName.git
After this all commands started working fine. You can check the change by using
git remote -v
In my case after successfull change it showed correct renamed repo in URL
[aniket@alok Android]$ git remote -v
origin ssh://git@github.com/aniket91/TicTacToe.git (fetch)
origin ssh://git@github.com/aniket91/TicTacToe.git (push)