Windows10 在VS Code中推送GitHub错误:remote:Permission to denied

问题背景:同一台电脑,操作系统Windows10;在VS Code中,项目A推送第一个GitHub账户远程仓成功;项目B推送到第二个GitHub账户远程仓失败。
失败信息:remote: Permission to ILoveAmy/vscode_github.git denied to pythonprogrammingbook.
fatal: unable to access 'https://github.com/ILoveAmy/vscode_github.git/': The requested URL returned error: 403

Windows10 在VS Code中推送GitHub错误:remote:Permission to denied_第1张图片
失败信息

解决方法
第一步:在Windows10搜索栏中输入"credential manager",启动凭据管理器。

Windows10 在VS Code中推送GitHub错误:remote:Permission to denied_第2张图片
启动凭据管理器
第二步:在凭据管理器,删掉github.com凭据。
Windows10 在VS Code中推送GitHub错误:remote:Permission to denied_第3张图片
删掉github.com凭据
第三步:在VS Code中,重新推送本地仓到GitHub代码仓,此时会弹出GitHub登录界面,填入GitHub用户名和密码,就可以成功完成推送工作了。
Windows10 在VS Code中推送GitHub错误:remote:Permission to denied_第4张图片
填入GitHub用户名和密码

参考阅读
《在VS Code中实现Python源代码版本管理:Github仓》

你可能感兴趣的:(Windows10 在VS Code中推送GitHub错误:remote:Permission to denied)