$ git push -u origin master
remote: Permission to ravi5026/web-server.git denied to vnaresh007.
fatal: unable to access 'https://github.com/ravi5026/web-server.git/': The requested URL returned error: 403
我在哪里可以删除 vnaresh007 并放置我自己的访问权限。我的凭据设置正确。
最佳答案
检查你的 git credential helper :这就是缓存了错误的凭据。
git config credential.helper
在 Mac 上,只需打开您的钥匙串(keychain)访问 -> 搜索 github.com 相关文件 -> 并在那里编辑凭据。
参见“Updating credentials from the OSX Keychain”
例如,在 Windows 上,这将是 Windows Credential Managers .
打开 Windows Credential Store,查看第一个用户是否已在那里注册:删除该条目,您将能够向第二个用户进行身份验证。
(这里以BitBucket为例,GitHub同理)
在命令行中,如seen here :
git credential reject protocol=https host=github.com <empty line here>
and then to set the new username & password:
git credential fill protocol=https host=github.com <empty line here>
Type
git help credential
for detailed info.
关于github - 当我将我的代码推送到 github.com 时出现问题,有人从我的电脑上获得了对 github 的主要访问权限,,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53492915/