解决码云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'.
相关推荐
STDD4 小时前
Soulmask《灵魂面具》 专用服务器搭建教程
运维·服务器·github
lolo大魔王5 小时前
Linux的监测程序
linux·运维·github
效能革命笔记7 小时前
Gitee DevSecOps 智能版本管理:军工软件工厂的依赖治理与供应链安全方案
网络·安全·gitee
米高梅狮子8 小时前
Redis
数据库·redis·mysql·缓存·docker·容器·github
_Evan_Yao9 小时前
如何搭建属于自己的技术博客(CSDN / GitHub Pages)
后端·学习·github
Quirkybrain9 小时前
从多态调用到简单析构:C 语言里的对象生命周期管理
github
加贝哥|usun10 小时前
最佳实践分享:GitHub项目自动同步到Gitee(码云)
gitee·github
m0_6346667310 小时前
ViMax 为什么会冲上 GitHub Trending:AI 视频生成开始从“出片”转向“制片”
人工智能·github·ai编程
JAVA学习通11 小时前
《大营销平台系统设计实现》 - 营销服务 第5节:抽奖前置规则过滤
java·数据库·github
少司府13 小时前
Tools相关:深入浅出学Git
大数据·c++·git·gitee·github·仓库·分支