解决git push 中remote: Permission to xxxxx.git denied to xxx. fatal: unable to acce

野性酷女 2023-07-20 12:19 124阅读 0赞

解决git push 中remote: Permission to xxxxx.git denied to xxx. fatal: unable to acce

  • 解决方案一
  • 解决方案二

解决方案一

第一步,将github中的项目clone下来

第二步,修改.git/cofig中的url

  1. cd 到项目中,编辑 .git/cofig中的url
  2. vim .git/config
  3. [remote "origin"]
  4. url = https://github.com/git的用户名/项目名称
  5. url改为
  6. url = https://git的用户名@github.com/git的用户名/项目名称

第三步,git push -u origin master

原文出自:解决git push 中remote: Permission to xxxxx.git denied to xxx. fatal: unable to access ‘https://github.com/ xxxxx.git/’: The requested URL returned error: 403

解决方案二

我们常常会遇到自己的用户名密码忘记、新入公司使用上任电脑时残留用户名密码,常常就会导致出现问题。显然我们需要清除残存的干扰账号,那么,我们该怎么做呢:

运行下列清除用户名密码的指令

  1. git credential-manager uninstall

然后再重新push就可以了

原文出自:git注意事项之|解决remote: User permission denied 问题

发表评论

表情:
评论列表 (有 0 条评论,124人围观)

还没有评论,来说两句吧...

相关阅读