Version Control problems

How to resolve “refusing to allow an integration to create or update .github/workflows/main.yml” on GitHub Desktop?

This post was most recently updated on November 12th, 2019.

Reading Time: 2 minutes.

Ran into this one when trying to push my merge from upstream. I was adhering to my own instructions (see below for a link), but got the error (further below) that stopped me from using GitHub Desktop to push (sync) at all.

So, the error I ran into:

! [remote rejected] master -> master (refusing to allow an integration to create or update .github/workflows/main.yml)
error: failed to push some refs to [repositoryname]

This was take weird – I hadn’t made any changes to said file, and I don’t think anyone else had, either.

This is likely an unintended feature of GitHub, and GitHub Desktop can’t do anything about it. However, there’s a nifty workaround available!

Solution

Table of Contents

A number of GitHub issues propose that this issue can be circumvented by actually committing a change removing the yaml file in question from the repository. However, if you’re merging from an upstream repository, you don’t usually want to do this! So we need to find another way.

Whereas GitHub Desktop is using OAuth, and running into this issue, Git Bash (the console application you use to merge upstream in my earlier example as well) doesn’t. And it’s also free from this issue, as it’s not considered “an integration”, and whatever it’s trying to do (or not do) to the yaml file just works.

So, in short – instead of using GitHub Desktop, open Git bash and run this:

cd [yourprojectpath] # after this, make sure the command line shows the right branch name!
git push

Et voila! You should be good.

References

Antti K. Koskela

Antti Koskela is a proud digital native nomadic millennial full stack developer (is that enough funny buzzwords? That's definitely enough funny buzzwords!), who works as a Solutions Architect for Valo Intranet, the product that will make you fall in love with your intranet.

He's been a developer from 2004 (starting with PHP and Java), and he's been bending and twisting SharePoint into different shapes since MOSS. Nowadays he's not only working on SharePoint, but also on .NET projects, Azure, Office 365 and a lot of other stuff. He's also Microsoft MVP for Office Development.

This is his personal professional (e.g. professional, but definitely personal) blog.
mm

4
Leave a Reply

avatar
5000
1 Comment threads
3 Thread replies
2 Followers
 
Most reacted comment
Hottest comment thread
2 Comment authors
mmPhilip Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
Philip
Guest
Philip

I have the same problem in Git Bash on Windows 10. Any other suggestion?