当前位置:首页 > 编程笔记 > 正文
已解决

【Git】推送Github失败:remote: Permission to xxx/*.git denied to xxx

来自网友在路上 140840提问 提问时间:2023-11-12 15:51:05阅读次数: 40

最佳答案 问答题库408位专家为你答疑解惑

在github上,创建了token,推送代码报没权限

#设置token
git remote set-url origin <your.token>@github.com/<your.name>/hello-git.git#推送代码
#git push -u origin main
remote: Permission to xxx/hello-git.git denied to xxx.
fatal: unable to access 'https://github.com/xxx/hello-git.git/': The requested URL returned error: 403

解决:在生成token时,需要勾选repo下面这些权限
在这里插入图片描述
(ps: 很久很久没用github了,一直用gitee,依稀记得之前是没有这些token权限功能的)

推送成功
在这里插入图片描述

查看全文

99%的人还看了

猜你感兴趣

版权申明

本文"【Git】推送Github失败:remote: Permission to xxx/*.git denied to xxx":http://eshow365.cn/6-38187-0.html 内容来自互联网,请自行判断内容的正确性。如有侵权请联系我们,立即删除!