The push was rejected by the server for containing a modification to the workflow file .github/workflows/main.yml

On macOS 10.13.6, in my fork of a project, I created a new branch from master on the command line, made some changes to the code, committed them using GitHub Desktop 2.5.5, and then tried to publish the branch using GitHub Desktop. It said:

The push was rejected by the server for containing a modification to the workflow file .github/workflows/main.yml

The branch did not modify anything in the .github directory.

I was able to publish the branch from the command line.

I have published hundreds of branches to this repository and others using GitHub Desktop over the past 4 years and have never seen this error before.

I reported the problem to the developers of GitHub Desktop and they said the error message is coming from GitHub and there is nothing they can do about it and suggested I report the bug to GitHub.

Since GitHub no longer offers a way to report bugs, I am reduced to writing this post to this community. Hopefully a GitHub developer sees it and adds it to whatever internal bug tracking system they use.

:wave: @ryandesign , thanks for opening this! I see where you’re coming from and wanted to follow up on your points.

We recently updated our guidance for handling and writing bug reports for GitHub. If you have something to report, we suggest opening a new topic in the relevant category (as you’ve done here :sparkles:) and one of our support engineers (or sometimes, me) will review the report and relay it to our engineering team if we can confirm that it’s something we need to look into further.

As for the issue that you’ve reported, I reviewed the log output attached in the aforementioned issue and I spotted this line:

 ! [remote rejected]         opendetex -> opendetex (refusing to allow an OAuth App to create or update workflow `.github/workflows/main.yml` without `workflow` scope)

Here’s an explanation for why you’re seeing this message. The GitHub Desktop applications uses our implementation of the OAuth App authorization flow whenever someone authorizes the application to access their account. Once authorized, there are a number of scopes granted to the application. This output indicates that the workflow scope wasn’t attached to the token that the request used to authenticate with’s Git server.

Looking through this project’s history, as of September 27, 2019, this pull request introduced a new change that requests the additional workflow scope on

While I’m not quite sure why that GitHub Desktop authorization does not have that scope, if you’re still seeing this, one path forward that you could try is to:

If that doesn’t help, then I can reach out to our engineering team internally for this report and investigate further. I’m keen to hear how it goes!