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

推送成功

相关推荐
散峰而望44 分钟前
【算法竞赛】队列和 queue
开发语言·数据结构·c++·算法·链表·github·线性回归
小宇的天下1 小时前
Virtuoso 工具中的关键文件说明
github
bing_feilong1 小时前
gitee pull 总是需要用户名和密码,该如何设置?
git·gitee
毒鸡蛋1 小时前
GIT报错:Connection to git. closed by remote host.
git
a程序小傲1 小时前
中国电网Java面试被问:Kafka Consumer的Rebalance机制和分区分配策略
java·服务器·开发语言·面试·职场和发展·kafka·github
ShallowLin2 小时前
Git简化分支管理(main+develop)
git
Miracle&2 小时前
Github无法push
github
犹若故人归11 小时前
Github/Gitee和Git实践
git·gitee·github
007php00713 小时前
mySQL里有2000w数据,Redis中只存20w的数据,如何保证Redis中的数据都是热点数据
数据库·redis·git·mysql·面试·职场和发展·php
fakerth14 小时前
Git 完全指南:从入门到精通
git