运行git push origin master报错

报错内容:

$ remote: Permission to 123xiaowang/ty2004.git denied to wjr990218.
$ git push origin master
fatal: unable to access ‘https://github.com/123xiaowang/ty2004.git/’: The requested URL returned error: 403
bash: $: command not found
翻译: 我们来大致的翻译一下这个错误:用户<旧的github名>没有权限访问用户<新的github名>的存储库<项目名>。
也就是说:现在电脑登录的是用户<旧的github名>,我们需要切换到用户<新的github名>。

解决方法:

找到下图中的路径,然后点击git:https://github.com 进入,然后将用户名和密码改为当前所用的github的账户和密码
运行git push origin master报错