Fixing a Problem Stopping Workflow Pushes to GitHub

I have tried using things like CircleCI in the past, but today I fancied another try with Github Actions. Unfortunately, I came across this problem whilst trying out their Quickstart instructions.

1
2
3
4
5
6
7
8
9
10
K:\github\logicalmoon.com\.github>git push
Counting objects: 5, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (5/5), 784 bytes | 392.00 KiB/s, done.
Total 5 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To https://github.com/s-moon/logicalmoon.com.git
! [remote rejected] master -> master (refusing to allow an OAuth App to create or update workflow `.github/workflows/github-actions-demo.yml` without `workflow` scope)
error: failed to push some refs to 'https://github.com/s-moon/logicalmoon.com.git'

It’s the text at the bottom that you need to focus on, and especially, the stuff about refusing to allow an OAuth App to create or update workflow. To be honest, the error does tell you what the issue is but you do need to translate it a little, which I will do for you now.

In short, it turned out that I had created a personal access token that didn’t have the workflow permissions. By that, I mean this:

Who’d have thought I’d ever need that? :-)

Fixing it is quite straight forward though but this is for a Windows machine. If you have something else, the process in theory should be similar, so just adapt it.

First, create a new personal access token, ensuring you check the Workflow permissions as shown above.

Copy that token into your clipboard.

Open up the Windows Credential Manager. You can find it by going to your Start Menu and typing “credential”; it should pop right up.

Run that program.

Now scroll down until you see the credentials for GitHub. For me, that’s the one below:

Click on the Edit button and paste in your new personal access token into the password box.

Click Save and you should now be able to push to your repo.


Hi! Did you find this useful or interesting? I have an email list coming soon, but in the meantime, if you ready anything you fancy chatting about, I would love to hear from you. You can contact me here or at stephen ‘at’ logicalmoon.com