我将代码推送到github.com时出现问题,有人可以从我的PC上对github进行主要访问,

时间:2018-11-27 04:45:44

标签: github git-bash

$ 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并放置自己的访问权限。我的凭据设置正确。

1 个答案:

答案 0 :(得分:0)

检查您的git credential helper :这是缓存错误凭据的原因。

git config credential.helper 

在Mac上,只需打开钥匙串访问->搜索github.com相关文件->并在其中编辑凭据即可。

https://help.github.com/assets/images/help/setup/keychain-access.png

请参见“ Updating credentials from the OSX Keychain

例如,在Windows上,该名称为Windows Credential Managers
打开Windows凭据存储,然后查看第一个用户是否在此注册:删除该条目,然后您便可以向第二个用户进行身份验证。

(这里是BitBucket的示例;相同的想法也适用于GitHub)

https://kwilson.io/blog/wp-content/uploads/2015/01/4-store.png

在命令行中,为seen here

git credential reject
protocol=https
host=github.com
<empty line here>
     

,然后设置新的用户名和密码:

git credential fill
protocol=https
host=github.com
<empty line here>
     

输入git help credential以获得详细信息。