解决码云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'.
相关推荐
计算机安禾27 分钟前
【C语言程序设计】第36篇:二进制文件的读写
c语言·开发语言·c++·算法·github·visual studio code·visual studio
用户9751470751361 小时前
在 Vite 中配置 CSS 模块
github
Ne0_bbk1 小时前
# ComfyUI+OpenClaw协同工作——七个坑,记录
github
wAIxiSeu2 小时前
开源项目分享——CLI-Anything
开源·github
研究点啥好呢3 小时前
3月19日GitHub热门项目推荐|OpenClaw棋逢对手
人工智能·ai·开源·github
千百元3 小时前
将本地的项目放到gitee仓库
gitee
猫头虎3 小时前
从零开始,一步步安装和配置OpenClaw汉化版详细安装指南
langchain·开源·prompt·github·aigc·ai编程·agi
wuyaolong0074 小时前
Git误操作急救手册大纲
ui·github
MicrosoftReactor4 小时前
技术速递|面向无障碍的持续 AI:GitHub 如何将反馈转化为包容性
人工智能·github
青晚舟18 小时前
AI 时代前端还要学 Docker & K8s 吗?我用一次真实部署经历说清楚
前端·github