推送代码报错: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
- 查看控制面板凭证
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
2022-06-10 区、段、碎片区