【问题标题】:Git - unable to push into gitlab project - "unable to update URL base from redirection"Git - 无法推送到 gitlab 项目 - “无法从重定向更新 URL 库”
【发布时间】:2018-02-19 13:20:01
【问题描述】:

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

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

当我输入这个命令时:

$ git push -u origin master

它给出了一些我在这里不明白的错误。

致命:无法通过重定向更新 URL 库:
要求:gitlab.com/AbdullahValley/Simple-CRUD.g/info/refs?service=git-receive-pack
重定向:gitlab.com/users/sign_in

【问题讨论】:

标签: git redirect gitlab git-push


【解决方案1】:

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

【讨论】:

  • 现在服务器正常。但同样的问题显示。 :(
【解决方案2】:

尽管使用了 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)

【讨论】:

    【解决方案3】:

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

    【讨论】:

    • 我只能通过远程 URL 访问推送,因为我没有为我的项目生成 SSH 密钥。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-10-10
    • 1970-01-01
    • 2014-01-19
    • 2014-03-15
    • 1970-01-01
    相关资源
    最近更新 更多