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

推送成功

相关推荐
Crystal3282 小时前
Git 基础:生成版本、撤消操作、版本重置、忽略文件
前端·git·github
Elastic 中国社区官方博客4 小时前
用 Elasticsearch 构建一个 ChatGPT connector 来查询 GitHub issues
大数据·人工智能·elasticsearch·搜索引擎·chatgpt·github·全文检索
系夏普4 小时前
Git 版本库(Ubuntu 环境)
git
用户345848285054 小时前
除了使用dict.fromkeys()和OrderedDict.fromkeys(),还有哪些方法可以实现列表去重?
github
IT从业者张某某5 小时前
DAY3-Open Harmony PC 命令行适配指南(Windows版)-git Permission denied (publickey) 问题
git·open harmony
摇滚侠5 小时前
零基础小白自学 Git_Github 教程,git 命令行操作1,笔记18
笔记·git·github
无限进步_5 小时前
C++从入门到类和对象完全指南
开发语言·c++·windows·git·后端·github·visual studio
itwangyang5206 小时前
在 GitHub 上生成和配置个人访问令牌(PAT),并将其用于 R 环境中的凭证管理和包安装。
开发语言·r语言·github
love530love6 小时前
【ComfyUI/SD环境管理指南(二)】:如何避免插件安装导致的环境崩溃与“外科手术式”修复
人工智能·windows·python·stable diffusion·github·aigc·comfyui
Violet_YSWY6 小时前
git删除某一提交
git