【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权限功能的)

推送成功

相关推荐
杨杨杨大侠31 分钟前
解密 atlas-mapper 框架 (9/10):故障排查与调试技巧
java·开源·github
徐小夕1 小时前
花了一天时间,开源了一套精美且支持复杂操作的表格编辑器tablejs
前端·算法·github
HelloGitHub2 小时前
终端里跑图形应用「GitHub 热点速览」
开源·github
数字化顾问13 小时前
GitHub热榜项目 - 日榜之应用场景与未来发展趋势
github
CoderJia程序员甲15 小时前
GitHub 热榜项目 - 日榜(2025-09-13)
ai·开源·大模型·github·ai教程
nightunderblackcat16 小时前
新手向:Git下载全攻略
git
逛逛GitHub17 小时前
1 个神级智能问数工具,刚开源就 1500 Star 了。
sql·github
梦想CAD控件18 小时前
(在线CAD平台)网页集成CAD SDK的方法
前端·javascript·github
若无_20 小时前
了解 .husky:前端项目中的 Git Hooks 工具
前端·git
想当花匠的小码农20 小时前
Git 仓库“减肥”指南:从检测、清理到同步的全流程实践
git