Seems like I accidentally added a few links to my local repo.
So when I'm trying to push my code using git push -u origin 'branch'
to the remote I get this error:
warning: remote.origin.url got a multiple values
fatal: could not set «remote.origin.url» at «https://Name:MyToken@github.com/Name/Repo.git»
So, I thought the problem was related to git auth tokens, but when I run git remote show origin
. It turned out I have multiple remote origin links for push:
**Don't pay attention at other blocks, everything that you need at this picture is already translated
* external repo origin
URL to extract: https://Name:MyToken@github.com/Name/Repo.git
URL to send: https://Name:MyToken@github.com/LovePelmeni/Repo.git
URL to send : git
HEAD ветка: main
Внешние ветки:
main отслеживается
order_tracker отслеживается
service_discovery новая (следующее извлечение сохранит ее в remotes/origin)
Локальные ветки, настроенные для «git pull»:
main будет слита с внешней веткой main
order_tracker будет слита с внешней веткой order_tracker
Локальные ссылки, настроенные для «git push»:
main будет отправлена в main (уже актуальна)
order_tracker будет отправлена в order_tracker (локальная ветка устарела)
So, I the question is how can I delete the remote origin link for push called git
?