git push gives fatal: unable to update url base from redirection:

I understand that your answer was already solved, but I had a very similar issue myself with a nonsense URL. The actual issue for me was that I had not logged into the company internet yet, so git was being redirected somehow through some sort of internet login page, and failing to go through.

The fix in this case is simple: just login in a separate browser before trying to git push your changes.


The URL you try to push to is total nonsense. You are trying to push to the URL https://gitlab.com/priceinsight/jmt4manager/compare/develop...2-retrieve-list-userrecord# which is a webpage that compares two branches and not the URL of a repository. The repository would be https://gitlab.com/priceinsight/jmt4manager.


You need to following 2 steps:

  • Remove current origin: Git remote remove origin
  • Add new origin: Git remote add origin https://...(your link to to on)

Tags:

Git

Gitlab