解决码云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'.
相关推荐
周杰伦_Jay2 小时前
【BGE-M3与主流RAG嵌入模型】知识库嵌入模型对比
人工智能·机器学习·eureka·开源·github
好好研究2 小时前
Git - 多人协作流程
git·gitee
旅之灵夫3 小时前
【GitHub项目推荐--Spec Kit:规范驱动开发完全指南】
github
旅之灵夫3 小时前
【GitHub项目推荐--Spec Workflow MCP:规范驱动开发的全栈解决方案】
github
Github掘金计划4 小时前
开发者狂喜!GitHub 官方开源:支持 Copilot/Cursor,规范即代码,27k Star 封神!
java·python·kafka·github·copilot
量子炒饭大师4 小时前
一天一个计算机知识——【编程百度】向上取整
c语言·数据结构·c++·git·github
白里透白的小白5 小时前
复盘 Git+GitHub SSH 配置:从权限报错到免密推送的全流程解决方案
git·ssh·github·版本控制
周杰伦_Jay7 小时前
【Agent智能体】开发流程与开源框架对比(GitHub热门项目分析)
开源·github
CoderJia程序员甲7 小时前
GitHub 热榜项目 - 日榜(2025-12-14)
ai·llm·github
nvd117 小时前
GKE web 应用实现 Auth0 + GitHub OAuth 2.0登录实施指南
前端·github