Git - 无法进入gitlab项目 - "无法从重定向更新URL基础"

时间:2017-09-11 10:18:55

标签: url redirect gitlab push

我为我的项目提供了这个远程URL。

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

当我输入此命令时:

$ git push -u origin master

它提供了一些我在此不明白的错误。

  

致命:无法从重定向更新网址:

     

要求:gitlab.com/AbdullahValley/Simple-CRUD.g/info/refs?service=git-receive-pack

     

重定向:gitlab.com/users/sign_in

3 个答案:

答案 0 :(得分:1)

因为它返回500错误。 https://gitlab.com/

答案 1 :(得分:0)

您是否在GitLab中启用了两个因子身份验证?

答案 2 :(得分:0)

尽管使用https并显然已正确设置了遥控器,但我还是突然想到了。

> 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)

使用-u固定的遥控器重置遥控器-

> 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'.

尽管网址没有改变...?

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