展开
拓展 关闭
订阅号推广码
GitHub
视频
公告栏 关闭

推送代码报错:fatal: unable to access 'https://gitlab.com/xxx/xxx.git/': The requested URL returned error: 403

  • 错误还原
# gitlab使用Bitbucket注册登录,执行 git push 命令,使用token验证报错如下
dogle@DESKTOP-KI961IK MINGW64 /d/workspaces/xxx (main)
$ git push
remote: HTTP Basic: Access denied. The provided password or token is incorrect or your account has 2FA enabled and you must use a personal access token instead of a password. See https://gitlab.com/help/topics/git/troubleshooting_git#error-on-git-fetch-http-basic-access-denied
fatal: Authentication failed for 'https://gitlab.com/xxx/xxx.git/'
dogle@DESKTOP-KI961IK MINGW64 /d/workspaces/xxx (main)
$ git push
remote: You are not allowed to push code to this project.
fatal: unable to access 'https://gitlab.com/xxx/xxx.git/': The requested URL returned error: 403
  • 解决方案

  • 将默认浏览器设置为gitlab登录的浏览器

  • git push推送

  • 点击授权

  • 成功

  • 控制台显示成功

dogle@DESKTOP-KI961IK MINGW64 /d/workspaces/xxx (main)
$ git push
warning: ----------------- SECURITY WARNING ----------------
warning: | TLS certificate verification has been disabled! |
warning: ---------------------------------------------------
warning: HTTPS connections may not be secure. See https://aka.ms/gcm/tlsverify for more information.
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 16 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 284 bytes | 284.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0), pack-reused 0 (from 0)
To https://gitlab.com/xxx/xxx.git
85f3850..5903408 main -> main
  • 查看控制面板凭证
posted @   DogLeftover  阅读(257)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
历史上的今天:
2022-06-10 区、段、碎片区
点击右上角即可分享
微信分享提示