在github上,创建了token,推送代码报没权限
#设置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权限功能的)
推送成功