Can't push to fork without also pushing new workflows

Git gurus –

How does one push to one’s fork, without adding workflows?

I don’t see any reason for my fork to be running any CI whatsoever – the main repository is already doing that. So I excluded workflows from my access token.


$ git checkout develop
Switched to branch 'develop'
Your branch is ahead of 'origin/develop' by 97 commits.
  (use "git push" to publish your local commits)

dlm@dlm:~/share/supercollider$ git push origin develop 
Username for '': jamshark70
Password for '': 
Total 0 (delta 0), reused 0 (delta 0)
 ! [remote rejected]     develop -> develop (refusing to allow a Personal Access Token to create or update workflow `.github/workflows/actions.yml` without `workflow` scope)
error: failed to push some refs to ''

Um… so… well, I guess it’s cosmetic because nobody should be using the develop branch from the fork… but it used to be possible to get rid of the “your branch is ahead of” message, but now it seems to be quite difficult to clean that up without duplicating CI work that is being done somewhere else.

Do we have a recommendation about how to handle this?


You can delete the workflow file from your fork, otherwise seems like actions can be disabled at repository level:

That simple :laughing: ok, I can try tomorrow.

Thanks :grin:


I’m afraid this didn’t work.

It seems that at some point I had already set my fork to disable actions. But this has no impact on pushing.

After deleting .github/ and contents, it still tries to push some comments involving actions, which is disallowed by my token.

So the question is still active: What is the recommendation? Do we simply require all contributors to enable actions in their access token?


I don’t think you can remove the workflow file, since that would diverge from the main repo.
Does that mean that going to Settings > Actions > Actions permissions > “Disable Actions” on your fork did not work?

OK, I see:

  • It’s mandatory to push the workflow actions – so, it’s mandatory for SC devs to use an access token with “workflow” privileges.

  • It’s possible/desirable to prevent the execution of those actions using the repository settings. (AFAICS this did work.)

If the developer guide hasn’t been updated with these requirements, that would be a good idea.