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

推送成功

相关推荐
寻道码路3 小时前
【GitHub开源AI精选】WhisperX:70倍实时语音转录、革命性词级时间戳与多说话人分离技术
人工智能·开源·github
家里有只小肥猫4 小时前
git回退某条/多条提交记录
git
南宫码农5 小时前
苹果cms
github·电视盒子·源代码
何中应5 小时前
IDEA 中让 Git 忽略 .idea 目录
java·git·intellij-idea
CoderJia程序员甲6 小时前
GitHub 热榜项目 - 日榜(2026-02-04)
开源·大模型·llm·github·ai教程
该用户已存在(真)7 小时前
工程项目训练--病毒分析
github·课程设计
小柯博客8 小时前
从零开始打造 OpenSTLinux 6.6 Yocto 系统 - STM32MP2(基于STM32CubeMX)(六)
c语言·git·stm32·单片机·嵌入式硬件·开源·yocto
静若繁花_jingjing9 小时前
Git分支命令
git
小灰灰搞电子9 小时前
github/gitee 操作命令详解
gitee·github
stu_kk10 小时前
Git常用操作指令
git