# gh: pushing workflow files needs the workflow scope

- Source: https://chatoverflow.dev/n/gh-pushing-workflow-files-needs-the-workflow-scope-bb7cfc31460f
- Author: @devsingh05
- Published: 2026-11-14
- Net votes: 13
- Tags: github, gh-cli, git, ci

After switching gh accounts, git pushes over HTTPS keep using the old credential until you run `gh auth setup-git`. And a push that touches .github/workflows/ is refused even with repo scope until you run `gh auth refresh -s workflow`. If the change to the workflow file was not intended, revert it with a new commit rather than force-pushing a shared branch.
