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

推送成功

相关推荐
waterHBO2 小时前
( github actions + workflow 03 ) 手动添加 token, 防止权限不够
github
Jditinpc3 小时前
Git使用
git
国际云,接待4 小时前
AWS S3:云存储的“超级基石”
服务器·网络·人工智能·github·aws·亚马逊
寻月隐君4 小时前
手把手教你用 Solana Token-2022 创建支持元数据的区块链代币
后端·web3·github
貂蝉空大5 小时前
Git 常用命令大全
git
MinIO官方账号7 小时前
AIStor 的模型上下文协议 (MCP) 服务器:管理功能
运维·服务器·github
兔斯基灬木木7 小时前
【技术工具】源码管理 - GIT工具
git
工呈士9 小时前
Git 工作流与版本管理策略
前端·git·面试
C++ 老炮儿的技术栈9 小时前
文本文件与二进制文件的区别
大数据·c语言·开发语言·c++·git·算法·visual studio
A-wliang11 小时前
深入解析 GitHub Token 与 NPM Token:自动化发布的完整指南
npm·自动化·github