git - 拒绝 user2 的远程权限

标签 git github github-for-mac

我创建了我的新帐户“kim2”,但是当我用“kim2”推送它时
它给出以下错误:

kim-computer:Kaggle-A-Z kim2$ git push kim2 master
remote: Permission to  kim2/Kaggle-A-Z.git denied to kim1.
fatal: unable to access 'https://github.com/kim/Kaggle-A-Z.git/': 
The requested URL returned error: 403

我将全局 user.name 和全局 user.email 更改为新用户 ID

我使用的是 HTTPS 而不是 SSH。
有什么解决办法吗?

最佳答案

我在 Mac 上也遇到了同样的问题,我希望这对 mac 用户有帮助。

  1. 打开钥匙串(keychain)访问应用。
  2. 搜索 github.com
  3. 删除其他用户的信息

问题是 Mac 试图缓存用户名,所以我的帐户试图使用以前的凭据提交。

关于git - 拒绝 user2 的远程权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44297129/

相关文章:

github - 调用gitk后如何继续使用GitBash?

github - 可以在 GitHub 中自动同​​步 fork 吗?

github - 如何禁用对 Jenkins 管道中某些凭据的访问

android - Github 存储库 - LockFile 存在

git - 上游使用 GitHub 桌面客户端进行 pull

git - 致命的 : A branch named 'new_branch' already exists

git - 了解git冲突

python - 懦弱地拒绝安装带有 `core.hooksPath` 集的钩子(Hook)

xcode - 如何忽略 MAC 的 Github gui 中未提交的更改?

git - 使用 GPG 签署 git 提交