解决码云gitee或者github出现The requested URL returned error: 403

出现场景

要把某个项目push到码云上,已经设置了仓库地址,在最后一步直接报错。

bash 复制代码
adodeMacBook-Pro:yimabao ado$ git push --set-upstream origin master
remote: [session-774b45b9] Access denied
fatal: unable to access 'https://gitee.com/mzmilk/yimabao.git/': The requested URL returned error: 403

解决方案

打开钥匙串,种类选择所有项目,在右边搜索git。

找到github或者gitee,删除对应的项目即可。

弹出窗口,选择删除。

再重新pull或者push,会提示输入密码和账号,输入正确的就能正常pull、push了。

bash 复制代码
adodeMacBook-Pro:yimabao ado$ git push --set-upstream origin master
Username for 'https://gitee.com': xxxxxx@qq.com
Password for 'https://xxxxxx@qq.com@gitee.com':
Enumerating objects: 158, done.
Counting objects: 100% (158/158), done.
Delta compression using up to 4 threads
Compressing objects: 100% (136/136), done.
Writing objects: 100% (158/158), 268.65 KiB | 5.97 MiB/s, done.
Total 158 (delta 25), reused 0 (delta 0)
remote: Resolving deltas: 100% (25/25), done.
remote: Powered by GITEE.COM [GNK-6.4]
To https://gitee.com/mzmilk/yimabao.git
 * [new branch]      master -> master
Branch 'master' set up to track remote branch 'master' from 'origin'.
相关推荐
独隅7 小时前
GitHub Actions 自动化运维实战:CI/CD 流水线一体化效果展示
运维·自动化·github
fthux7 小时前
装闭 RenoPit 源码解析(05):FastAPI与Celery如何执行AI装修分析
人工智能·ai·开源·github·open source·renopit
qq_267612898 小时前
Gitee项目管理推荐:从工具链割裂到DevOps全链路贯通的企业级协作实践
运维·gitee·devops
YuePeng12 小时前
一个注解起家,25 个模块收尾:Erupt 的生态版图长这样
后端·github
我是若尘14 小时前
发布分支落后于主干,MR 全是冲突?聊聊业界怎么治这个“祖传”难题
github
笨鸟先飞,勤能补拙14 小时前
网络安全等级保护 2.0:从定级备案、建设整改到持续合规的系统指南
网络·人工智能·windows·安全·web安全·网络安全·github
echoVic15 小时前
CI 已经绿了,为什么你的 Agent 还在用旧规则?
github
echoVic15 小时前
AI 评审最怕的不是漏报,而是审完以后代码已经变了
github
Patrick在香港17 小时前
Claude API + Python:香港MPF基金回报率自动化分析框架
windows·python·数据分析·自动化·github·ai编程·数据可视化
tju233317 小时前
从文档存储到研发知识链路:Gitee Wiki 如何嵌入 DevSecOps 流程
gitee