Today when I added a workflow and push the code to GitHub remote repo, shows this error:
refusing to allow a Personal Access Token to create or update workflow
This is the full error output:
~/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)
I am auth with token and have privillege to modify the repo. Now I could not push using password. When I try to use my password, the error message is:
~/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)
Why would this happen and what should I do to fix it?