desktop: Main.workflow causes an error when publishing a new branch
Description
I recently added a Github action to my repository, and attempted to retrieve it using the desktop client, and ended up with the following error:
Total 0 (delta 0), reused 0 (delta 0)
To https://github.com/JamesIves/reddit-viewer.git
! [remote rejected] doc-test -> doc-test (refusing to allow an integration to create main.workflow)
error: failed to push some refs to 'https://github.com/JamesIves/reddit-viewer.git'
You can see the workflow here:
I attempted to remove main.workflow, but after committing it I get a similar error when pushing to master.
Enumerating objects: 3, done.
Counting objects: 33% (1/3)
Counting objects: 66% (2/3)
Counting objects: 100% (3/3)
Counting objects: 100% (3/3), done.
Delta compression using up to 8 threads
Compressing objects: 50% (1/2)
Compressing objects: 100% (2/2)
Compressing objects: 100% (2/2), done.
Writing objects: 50% (1/2)
Writing objects: 100% (2/2)
Writing objects: 100% (2/2), 230 bytes | 230.00 KiB/s, done.
Total 2 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 0% (0/1)
remote: Resolving deltas: 100% (1/1)
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To https://github.com/JamesIves/reddit-viewer.git
! [remote rejected] master -> master (refusing to allow an integration to delete main.workflow)
error: failed to push some refs to 'https://github.com/JamesIves/reddit-viewer.git'
Version
- GitHub Desktop: 1.5.1
- Operating system: Mac OSX Mojave 10.14.1
Steps to Reproduce
Expected Behavior
I expect it to publish the branch with no errors.
Actual Behavior
It errors.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 7
- Comments: 15 (4 by maintainers)
this issue is still happening and is very annoying
For other Googler who fall here. It work with HTTPS if you use an access token
What you can do also is switch to a git URL over an HTTP url for git. It works
Was this closed because there was a solution found? I am having the same issue.
The push works fine from the
gitCLI, so I think it’s trying to stop OAuth apps from deleting workflows.Hi there,
Closed a long time but still the most updated thread about this. Is there any solution on this to let contributors to fork and push their work as before - on HTTPs without token and other magic? Currently, this is a dealbreaker for us now - which is very unpleasant because I have waited for GitHub actions for a long time.
This isn’t just for deleting
main.workflow, it also happens when it’s being modified. Same problem with Git Kraken. The only solution I found is to use thegitcommand line or edit/delete the file on github.com. Adding/.github/main.workflowto.gitignorehelps but there’s still a problem when merging a branch to another branch with changes to the workflow file. Would love to see a proper solution though.@JamesIves thanks for the report, but I’m not sure there’s anything that GitHub Desktop can do with this error:
The GitHub remote isn’t letting you push a branch that removes
main.workflow, for reasons that are unclear to me. I’d recommend contacting Support to clarify how you should remove a workflow from a repository, as the documentation for Actions doesn’t have any guidance on this.Just to clarify… everyone seems to blame the fact that the
main.workflowfile is being edited. But that isn’t the case for me. That file was untouched.Thanks @j-f1 for the extra context!