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

推送成功

相关推荐
逛逛GitHub13 小时前
推荐 11 个本月热门的 GitHub 开源项目,尤其是第 9 个。
github
钱栈up21 小时前
GitHub 热榜上手|T3 Code:手机远程操控 7 款 AI 编程 Agent
typescript·开源·github
`流年づ1 天前
联邦学习-安全聚合
git·安全·github
CoderYanger1 天前
Java EE 进阶:14.案例综合练习-博客系统(第二弹):博客详情+令牌技术
服务器·前端·spring boot·后端·spring·java-ee·github
喜欢吃燃面1 天前
Git 原理与使用(三):标签、多人协作与 Git Flow 落地
大数据·git·elasticsearch
喜欢吃燃面2 天前
Git 原理与使用(二):分支是平行宇宙,远程仓库是共享时空
大数据·git·elasticsearch
逛逛GitHub2 天前
民间大神移植《GTA 6》进度已经到 90% 了,这几个 GitHub 项目关注一下
github
怪我冷i2 天前
Git主备分离,双仓库发布
git
解道Jdon2 天前
Rust重写OpenCode Rune:性能提升最高100倍
ide·windows·git·svn·eclipse·github·visual studio