github - 当我将我的代码推送到 github.com 时出现问题,有人从我的电脑上获得了对 github 的主要访问权限,

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

最佳答案

检查你的 git credential helper :这就是缓存了错误的凭据。

git config credential.helper 

在 Mac 上,只需打开您的钥匙串(keychain)访问 -> 搜索 github.com 相关文件 -> 并在那里编辑凭据。

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

参见“Updating credentials from the OSX Keychain

例如,在 Windows 上,这将是 Windows Credential Managers .
打开 Windows Credential Store,查看第一个用户是否已在那里注册:删除该条目,您将能够向第二个用户进行身份验证。

(这里以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>

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/

相关文章:

windows - 如何在 Windows 上处理 Git 上区分大小写的分支

atlassian-sourcetree - Sourcetree 无法打开 Git Bash

git - Git for Windows/WSL2/VS Code 的非常奇怪的问题

git - 下载与主题匹配的 GitHub 存储库列表?

github - 使用 GitHub 流程的开发和生产环境

git - Git历史记录作为常规文件

api - 如何使用 AJAX 在 GitHub web api 的存储库上创建 webhook?

eclipse - 提交项目不显示在 Eclipse 中提交对 Git 存储库的更改 pop 窗口

ruby-on-rails - Rails 控制台有时会发疯

wget - 谁能教我安装 wget 到 git bash