Common causes
- You ran git remote add origin twice
- The remote was set when you cloned the repo and you're trying to add it again
- You're trying to point origin to a different URL than the one already set
- A previous setup script already configured the remote
How to fix it
- Check what remotes are already set: git remote -v
- Update the existing origin URL instead: git remote set-url origin <new-url>
- Remove the old remote first then re-add: git remote remove origin && git remote add origin <url>
- Use a different name if you need a second remote: git remote add upstream <url>
Example
fatal: remote origin already exists.Running git remote add origin after the remote was already set
Have a different error?
Paste any error message into the Error Translator to get an instant explanation.
