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

柔情痞子 提交于 2019-12-18 12:13:30

问题


I did commit successfully in my local repository. When I try to do:

git push https://gitlab.com/priceinsight/jmt4manager/compare/develop...2-retrieve-list-userrecord# 2-retrieve-list-userrecord -v

I got this error:

Pushing to https://gitlab.com/priceinsight/jmt4manager/compare/develop...2-retrieve-list-userrecord#
fatal: unable to update url base from redirection:
  asked for: https://gitlab.com/priceinsight/jmt4manager/compare/develop...2-retrieve-list-userrecord#/info/refs?service=git-receive-pack
   redirect: https://gitlab.com/users/sign_in

回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/43835309/git-push-gives-fatal-unable-to-update-url-base-from-redirection

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!