首页 > 解决方案 > 如何按需更改 github 凭据?

问题描述

我有一个 github 帐户,我用它在 microsft 边缘浏览器上登录。另一个是镀铬的。主要是我使用来自microsoft edge的那个,在第一次提交github时,当我尝试推送时再次询问用户名和密码,我成功登录,之后我一直使用该帐户,我推送没有问题。

现在我需要在 chrome 上的另一个帐户上推送一些东西。但我仍然以某种方式在我的电脑上“登录”为我在微软边缘使用的 github 帐户。

当我尝试推送其他帐户时(当然,我从该帐户添加了第一个远程仓库来源)我得到了

$ git push -u origin master
remote: Permission to xxxx.git denied to some-user-name.
fatal: unable to access 'https://github.com/xxx/project-name.git/': The requested URL returned error: 403

我该如何解决这个问题?

标签: gitgithubgit-bashgit-credential-manager

解决方案


推荐阅读