あまブログ

ドキドキ......ドキドキ2択クイ〜〜〜〜〜〜〜ズ!!

【GitHub Actions】refusing to allow a Personal Access Token to create or update workflow エラーを解決する

GitHub Actionsのワークフローを作成してpushしようとしたら、Personal Access Tokenに関するエラーが発生しました。

エラー内容

GitHub Actionsのワークフローを記述した.github/workflows/github-actions-demo.ymlをリモートにpushしようとしたら、以下のエラーが発生しました。

refusing to allow a Personal Access Token to create or update workflow `.github/workflows/github-actions-demo.yml` without `workflow` scope

Personal Access Tokenのworkflowスコープがないと、ワークフローの作成・更新を拒否するみたいです。

解決法

https://github.com/settings/profile > Developer settings > Personal access tokes > Tokens (classic) > トークンを選択 > Select scopes内のworkflowにチェックを入れる > Update token

Personal access tokensの編集画面

上記の設定をして、pushできるようになりました。