解决码云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': [email protected]
Password for 'https://[email protected]@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'.
相关推荐
uhakadotcom1 小时前
跨越速运日调用千万,秒级响应!Flink + OceanBase 实时分析方案全解析
后端·面试·github
uhakadotcom1 小时前
marimo Python笔记本:让Python交互式编程更简单、更可靠
后端·面试·github
还是鼠鼠1 小时前
Android移动应用开发入门示例:Activity跳转界面
android·前端·gitee·android studio·android-studio
Gladiator57511 小时前
博客记录-day151-面试+力扣
github
三道杠卷胡13 小时前
【AI News | 20250424】每日AI进展
人工智能·pytorch·python·语言模型·github
油泼辣子多加14 小时前
2025年04月24日Github流行趋势
github
uhakadotcom16 小时前
人工智能如何改变医疗行业:简单易懂的基础介绍与实用案例
算法·面试·github
xrkhy16 小时前
提交到Gitee仓库
gitee
uhakadotcom18 小时前
企业智能体网络(Agent Mesh)入门指南:基础知识与实用示例
后端·面试·github
我的golang之路果然有问题19 小时前
给git配置SSH(github,gitee)
经验分享·笔记·git·学习·gitee·ssh·github