1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

お題は不問!Qiita Engineer Festa 2024で記事投稿!
Qiita Engineer Festa20242024年7月17日まで開催中!

refusing to allow a Personal Access Token to create or update workflowエラーの解決法

Last updated at Posted at 2024-06-20

はじめに

最近 Qiita CLI を使って記事を管理し始めたのですが、
以下の token エラーに遭遇して push できなかったので、対処法を備忘録として残そうと思います。

$ git push origin main
Enumerating objects: 10, done.
Counting objects: 100% (10/10), done.
Delta compression using up to 8 threads
Compressing objects: 100% (6/6), done.
Writing objects: 100% (9/9), 26.54 KiB | 8.85 MiB/s, done.
Total 9 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
To https://github.com/skido32/qiita-content.git
 ! [remote rejected] main -> main (refusing to allow a Personal Access Token to create or update workflow `.github/workflows/publish.yml` without `workflow` scope)
error: failed to push some refs to 'https://github.com/skido32/qiita-content.git'

対処法

SettingsDeveloper settingspersonal access tokensからアクセストークン設定を確認

スクリーンショット 2024-06-19 23.28.02.png

私の場合はFine-grained personal access tokensを利用していたので、
対象のアクセストークン設定画面を開き、Access onEdit

スクリーンショット 2024-06-19 23.37.24.png

PermissionsRepository permissionsWorkflows
Access: Read and writeに変更し、updateをクリックで設定完了

スクリーンショット 2024-06-19 23.46.06.png

無事 push することができました!

$ git push origin main
Enumerating objects: 10, done.
Counting objects: 100% (10/10), done.
Delta compression using up to 8 threads
Compressing objects: 100% (6/6), done.
Writing objects: 100% (9/9), 26.54 KiB | 13.27 MiB/s, done.
Total 9 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
To https://github.com/skido32/qiita-content.git
   c69fcf3..e8cf83e  main -> main
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?