因为某些不知名的骚操作,我在git push自己的代码时提示下面这样的报错信息

remote: Permission to marsggbo/xxx.git denied to 其他用户名.
fatal: unable to access 'https://github.com/marsggbo/xxx.git/': The requested URL returned error: 403

试了一圈办法才找到有用的。方法很简单,亲测在linux系统上有效:

git config --global --unset credential.helper

参考 https://stackoverflow.com/questions/21615431/git-pushes-with-wrong-user-from-terminal

另外也可以试试下面的方法,就是把用户cache删了

git credential-cache exit

参考https://stackoverflow.com/questions/15381198/remove-credentials-from-git

微信公众号:AutoML机器学习
git push提示 Permission to user1/xxx.git denied to other user2.
MARSGGBO原创
如有意合作或学术讨论欢迎私戳联系~
邮箱:marsggbo@foxmail.com

相关文章:

  • 2021-08-17
  • 2022-12-23
  • 2021-10-26
  • 2018-09-26
  • 2022-12-23
  • 2022-01-17
  • 2021-06-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-19
  • 2021-10-19
  • 2021-12-04
相关资源
相似解决方案