今天,当我添加工作流程并将代码推送到 GitHub 远程存储库时,显示此错误:
\nrefusing to allow a Personal Access Token to create or update workflow\nRun Code Online (Sandbox Code Playgroud)\n这是完整的错误输出:
\n~/Documents/GitHub/flutter-netease-music on \xee\x82\xa0 master \xe2\x8c\x9a 12:25:13\n$ git push origin master \xe2\x80\xb9ruby-2.7.2\xe2\x80\xba\nUsername for 'https://github.com': username\nPassword for 'https://jiangxiaoqiang@github.com':\nEnumerating objects: 19, done.\nCounting objects: 100% (19/19), done.\nDelta compression using up to 12 threads\nCompressing objects: 100% (11/11), done.\nWriting objects: 100% (13/13), 1.86 KiB | 1.86 MiB/s, done.\nTotal 13 (delta 6), reused 0 (delta 0), pack-reused 0\nremote: Resolving deltas: 100% (6/6), completed with 4 local objects.\nTo https://github.com/jiangxiaoqiang/flutter-netease-music.git\n ! [remote rejected] master -> master (refusing to allow a Personal Access Token to create or update workflow `.github/workflows/main-ios.yml` without `workflow` scope)\nerror: failed to push some refs to 'https://github.com/jiangxiaoqiang/flutter-netease-music.git'\n(base)\nRun Code Online (Sandbox Code Playgroud)\n我使用令牌进行身份验证,并有权修改存储库。现在我无法使用密码进行推送。当我尝试使用我的密码时,错误消息是:
\n~/Documents/GitHub/flutter-netease-music on \xee\x82\xa0 master \xe2\x8c\x9a 12:28:37\n$ git push origin master \xe2\x80\xb9ruby-2.7.2\xe2\x80\xba\nUsername for 'https://github.com': username\nPassword for 'https://jiangxiaoqiang@github.com':\nremote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.\nremote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.\nfatal: unable to access 'https://github.com/jiangxiaoqiang/flutter-netease-music.git/': The requested URL returned error: 403\n(base)\nRun Code Online (Sandbox Code Playgroud)\n为什么会发生这种情况以及我应该采取什么措施来解决它?
\nDol*_*hin 61
在 GitHub 中创建令牌时授予工作流权限:
2023.07 更新: 新的个人访问令牌更改为新的个人访问令牌(经典),路径为:设置->开发者设置->个人访问令牌(经典)。
| 归档时间: |
|
| 查看次数: |
16453 次 |
| 最近记录: |