【问题标题】:refusing to allow a Personal Access Token to create or update workflow [duplicate]拒绝允许个人访问令牌创建或更新工作流程 [重复]
【发布时间】:2021-10-19 00:53:02
【问题描述】:

今天当我添加工作流并将代码推送到 GitHub 远程仓库时,显示此错误:

refusing to allow a Personal Access Token to create or update workflow

这是完整的错误输出:

~/Documents/GitHub/flutter-netease-music on  master ⌚ 12:25:13
$ git push origin master                                                                                                      ‹ruby-2.7.2›
Username for 'https://github.com': username
Password for 'https://jiangxiaoqiang@github.com':
Enumerating objects: 19, done.
Counting objects: 100% (19/19), done.
Delta compression using up to 12 threads
Compressing objects: 100% (11/11), done.
Writing objects: 100% (13/13), 1.86 KiB | 1.86 MiB/s, done.
Total 13 (delta 6), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (6/6), completed with 4 local objects.
To https://github.com/jiangxiaoqiang/flutter-netease-music.git
 ! [remote rejected] master -> master (refusing to allow a Personal Access Token to create or update workflow `.github/workflows/main-ios.yml` without `workflow` scope)
error: failed to push some refs to 'https://github.com/jiangxiaoqiang/flutter-netease-music.git'
(base)

我是 auth with token 并且有权修改 repo。现在我无法使用密码推送。当我尝试使用我的密码时,错误消息是:

~/Documents/GitHub/flutter-netease-music on  master ⌚ 12:28:37
$ git push origin master                                                                                                      ‹ruby-2.7.2›
Username for 'https://github.com': username
Password for 'https://jiangxiaoqiang@github.com':
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
fatal: unable to access 'https://github.com/jiangxiaoqiang/flutter-netease-music.git/': The requested URL returned error: 403
(base)

为什么会发生这种情况,我应该怎么做才能解决它?

【问题讨论】:

    标签: github


    【解决方案1】:

    在 GitHub 中创建令牌时给予工作流特权:

    【讨论】:

      猜你喜欢
      • 2021-06-13
      • 2021-10-18
      • 2021-01-11
      • 2021-01-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-09-07
      相关资源
      最近更新 更多