Search code examples
gitgithubgit-remote

'origin' does not appear to be a remote repository


I am trying to push some code into a new, fresh repo over at github. But I am getting the error below. I have done nothing strange, I always do the same steps, but this time, I see the error. I SO'd the error but none of the fixes work.

https://i.sstatic.net/lSlGg.png

The git remote -v command gives the following:

origin
upstream

How can I fix it?


Solution

  • This would happen if you accidentally put remote configurations in the system-level git config. (I've seen this happen several times)

    Run git config --system --edit and delete or comment out any [remote ] sections.