【发布时间】:2020-10-16 06:04:13
【问题描述】:
git push https://github.com/YusupovSamandar/Pubg.git master
remote: Permission to YusupovSamandar/Pubg.git denied to SamandarYusupov.
fatal: unable to access 'https://github.com/YusupovSamandar/Pubg.git/': The requested URL returned error: 403
我创建了新的 github 帐户,当我推送我的 repo 时发生了这个错误
然后我用 git config --global credential.helper "" 删除了我的 github 帐户
现在当我想推送到 github 时,git 每次都在询问用户名和密码。
那么有什么方法可以让我完全将我的 git 设置更改为我的新帐户,以便 git 每次都会询问类型错误或询问用户名和密码
【问题讨论】:
-
credential.helper的值是多少?如果它是manager并且您使用的是 Windows,则用户名和密码存储在 Windows 凭据管理器中。你可以编辑它们。如果是store,它们将存储在本地文件中,例如~/.git-credentials。你也可以编辑它。