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

推送成功

相关推荐
int WINGsssss15 分钟前
Git使用
git
西柚与蓝莓8 小时前
任务【浦语提示词工程实践】
github
Good_Starry14 小时前
Git介绍--github/gitee/gitlab使用
git·gitee·gitlab·github
云端奇趣19 小时前
探索 3 个有趣的 GitHub 学习资源库
经验分享·git·学习·github
运营黑客20 小时前
发现一超级Prompt:让GPT-4o、Claude3.5性能再升级(附保姆级教程)
github
記億揺晃着的那天21 小时前
Github优质项目推荐-第二期
github
F_D_Z1 天前
【解决办法】git clone报错unable to access ‘xxx‘: SSL certificate problem:
网络·git·网络协议·ssl
Uncertainty!!1 天前
GitHub入门与实践
github
罗曼蒂克在消亡1 天前
github项目——gpt-pilot自动创建应用
gpt·github·github项目
等风来不如迎风去1 天前
【git】main|REBASE 2/6
git