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

推送成功

相关推荐
uhakadotcom13 小时前
在python 的 工程化架构中 ,什么是 薄包装器层?
后端·面试·github
Avan_菜菜1 天前
AI 能写代码了,为什么我反而开始要求它先写文档?
前端·github·ai编程
逛逛GitHub2 天前
这个爆红的 GitHub 项目让 token 直接省 60–95%。
github
iccb10132 天前
5年,一个程序员是如何把私有化在线客服系统做到第一名的
前端·后端·github
蝎子莱莱爱打怪2 天前
AI Agent 相关知识扫盲:16 个概念+11张图+38个开源项目推荐
人工智能·github·agent
用户317723070362 天前
Pydub:用 Python 处理音频,不写废话
github
深海鱼在掘金2 天前
Git 完全指南 —— 第1章:Git 概览与版本控制演进
git
张居邪2 天前
GitHub Actions + 阿里云 OSS:OIDC 免密同步构建产物
后端·github
张居斜2 天前
GitHub Actions + 阿里云 OSS:OIDC 免密同步构建产物
github·oss·llm-wiki
用户3228360084472 天前
python-rapidjson:用 C++ 速度处理 JSON 的 Python 库
github