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

推送成功

相关推荐
zzzzls~3 小时前
Vibe Coding 最佳实践:Claude Code 检查点回溯与 Git 自动存档每轮对话
git·ai·claude·vibe coding·checkpointing
ssshooter4 小时前
彻底搞懂 SSH 与 Git 的“幕后交易”
git·github·全栈
irisMoon065 小时前
GitHub Copilot
github·copilot
Asurplus8 小时前
Centos7安装Git环境
git·centos·yum·dnf
m0_743125139 小时前
claude --version 报错Claude Code on Windows requires git-bash (https://git-scm.com/downloads/win).
开发语言·git·bash
AntoineGriezmann10 小时前
Git:新建功能分支并解决 Merge 冲突
git
消防大队VUE支队10 小时前
家里到底连了多少设备?这款开源神器让你一目了然
github
逛逛GitHub11 小时前
9 个 超绝的 AI 控制电脑 GitHub 开源项目。
github
Sylus_sui12 小时前
Git快速创建并推送新分支
git
悠悠子衿1213813 小时前
Claude+VSCODE配置git导致频繁弹出git bash 的CMO窗口解决方法
ide·git·vscode