如果你在多个github账户之间切换,并在不同的github上克隆了仓库时,那么在提交代码的时候就会容易出现403错误,如下:

image
这个错误信息其实很明显,就是你要提交的github和你当前的github不是一个账号,我在网上搜索一下,也有很多种解决办法,下面介绍其中一种,亲测有效:
打开终端输入:
rundll32.exe keymgr.dll,KRShowKeyMgr
在弹出的框中选择github并编辑

image
在下拉框中选择需要的账户,输入密码,点击确定

image
再重新push就可以成功了。