#TIL 13 - How to fix refusing to allow an OAuth App to create or update workflow | ProductsWay

#TIL 13 - How to fix refusing to allow an OAuth App to create or update workflow

May 20, 2021 · Dung Huynh

What

Fix the "refusing to allow an OAuth App to create or update workflow" error when you push GitHub Actions files.

Why

GitHub requires the workflow scope on your token to modify files under .github/workflows/. If GitHub CLI's stored token lacks that scope, request it explicitly and authenticate again.

How

Refresh GitHub CLI's token with the required scope:

gh auth refresh -s workflow

gh auth switch only selects an account that is already authenticated; it does not add scopes.