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

推送成功

相关推荐
Jiude6 小时前
AI 写代码太快之后,团队协作反而更难了
人工智能·架构·github
Ws_8 小时前
Git + Gerrit 第二课:diff、暂存区与撤销修改
git
snowjlz9 小时前
鸿蒙版SVN来了!!!
git·svn·版本控制
2401_8769641311 小时前
27考研余炳森概率论|喻老李良2027资料网课
windows·git·考研·svn·eclipse·github·概率论
AhriProGramming11 小时前
GitHub开源项目推荐-1:pyd_packer
github
爱搬砖的狮子12 小时前
【Git】git repo下载使用
git
独自归家的兔12 小时前
AI界的 GitHub?Hugging Face 全面解析
人工智能·github
逛逛GitHub14 小时前
GitHub 上刚开源的国产 3D 高斯浏览器,杭州六小龙给力啊。
github
cheems952715 小时前
Git基本操作
git
Irissgwe15 小时前
三、Git 文件状态管理:add、commit、status 和 diff
git