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

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

bash 复制代码
#设置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权限功能的)

推送成功

相关推荐
FreeBuf_21 分钟前
公开GitHub Issue可诱骗AI泄露私有数据,绕过防护仅需一词
人工智能·github·issue
开发者联盟league1 小时前
git commit报错No .pre-commit-config.yaml file was found
git
JavaGuide2 小时前
又一个画图 Skill 开源,再见手动画 draw.io!
前端·后端·github
小弥儿2 小时前
GitHub今日热榜 | 2026-07-09:OfficeCLI 以 92% 日增幅入围
学习·开源·github
逛逛GitHub3 小时前
GitHub 上 5 个小众但实用的开源项目,感兴趣收藏一波。
github
逛逛GitHub3 小时前
4 个最近值得收藏的 GitHub 开源项目。
github
粤M温同学5 小时前
VS Code GitHub Copilot插件中配置 DeepSeek 模型
github·copilot
AC赳赳老秦6 小时前
传感器数据自动汇总:OpenClaw 采集多类传感器数据、清洗入库、生成趋势分析
java·人工智能·python·自动化·github·php·openclaw
猫老板的豆6 小时前
git实战
git
csdn_aspnet7 小时前
开源项目在GitHub上的破圈方法论,解析Star增长、Issue响应、Contributor引导等真实运营技巧
开源·github·issue·readme·star