I've observed that my Git repository has two remotes for origin because when I run this:
git config --get-regexp 'remote\\.origin\\..*'
I get two results:
remote.origin.url https://user:password@my-repo:7990
remote.origin.url http://my-repo.com:7990/scm/my-project.git
However, I fail to delete either of them. For instance, if I try to delete the first one, like this:
git remote set-url --delete origin https://user:password@my-repo:7990
I get:
fatal: could not unset 'remote.origin.url'
Any idea why this error appears?