Git - unable to push into gitlab project - “unable to update URL base from redirection”

懵懂的女人 提交于 2019-12-23 12:56:14

问题


I gave this remote URL for my project.

git remote add origin https://gitlab.com/AbdullahValley/simple-crud.git

When I entered this command:

$ git push -u origin master

It gives some ERROR which I don't understand here.

fatal: unable to update URL base from redirection:
asked for: gitlab.com/AbdullahValley/Simple-CRUD.g/info/refs?service=git-receive-pack
redirect: gitlab.com/users/sign_in


回答1:


Because it's return 500 error. https://gitlab.com/




回答2:


Do you have two factor authentication enabled within GitLab?




回答3:


This happened to me out of the blue, despite using https and apparently having the remotes set up correctly.

> git push
fatal: unable to update url base from redirection:
  asked for: https://gitlab.com/bburnskm/moveto-io.git/info/refs?service=git-receive-pack
   redirect: https://about.gitlab.com/2018/07/19/gcp-move-update/

> git remote -v
origin  https://gitlab.com/bburnskm/moveto-io.git (fetch)
origin  https://gitlab.com/bburnskm/moveto-io.git (push)

Resetting the remotes with -u fixed it -

> git push -u origin bb-ui
Enumerating objects: 40, done.
Counting objects: 100% (40/40), done.
Delta compression using up to 4 threads.
Compressing objects: 100% (29/29), done.
Writing objects: 100% (29/29), 3.85 KiB | 788.00 KiB/s, done.
Total 29 (delta 21), reused 0 (delta 0)
remote:
To https://gitlab.com/bburnskm/moveto-io.git
   7dce642..b67ffcc  bb-ui -> bb-ui
Branch 'bb-ui' set up to track remote branch 'bb-ui' from 'origin'.

Though the urls didn't change... ?

> git remote -v
origin  https://gitlab.com/bburnskm/moveto-io.git (fetch)
origin  https://gitlab.com/bburnskm/moveto-io.git (push)


来源:https://stackoverflow.com/questions/46153332/git-unable-to-push-into-gitlab-project-unable-to-update-url-base-from-redir

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