Solution code cloud gitee or github appears The requested URL returned error: 403

scene

To push a certain project to Code Cloud, the warehouse address has been set, and an error will be reported directly in the last step.

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

solution

Open the keychain, select all items in the category, and search for git on the right.
Find github or gitee and delete the corresponding project.
insert image description here
A window pops up, select Delete.
insert image description here

Then pull or push again, you will be prompted to enter the password and account number, and you can pull and push normally after entering the correct one.

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'.

Guess you like

Origin blog.csdn.net/adojayfan/article/details/126357487