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

推送成功

相关推荐
R²AIN SUITE3 小时前
项目管理平台怎么和OA、钉钉、飞书、Git仓库打通?从消息通知到双向同步的5种实现路径
git·钉钉·飞书
miofly3 小时前
GitHub 日榜趋势速报 | 2026-10-21
开源·github
u1301303 小时前
GitHub 热榜项目:日榜(2026-10-20)
人工智能·github
JYCJ_4 小时前
星愿池·桌面卡片
github
高频因子挖掘机4 小时前
别再手动维护股票名称映射表:用 Python 查询交易所元数据
后端·github·api
高频因子挖掘机5 小时前
QuantDash 明明安装成功,为什么 Python 还是无法 import?
后端·github·api
高频因子挖掘机14 小时前
A股量化从日线升级到5分钟线:数据量增加后最先暴露哪些工程问题?
后端·github·api
Demons_kirit15 小时前
CTFHub 信息泄露通关笔记:Git泄露 Log - 教程
笔记·git·网络安全
高频因子挖掘机15 小时前
历史行情返回顺序变了,为什么按行号计算指标很危险?
后端·github·api
用户72737441388416 小时前
两个日期中间隔了多少天:闰年和跨年最容易算错
github