Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main.workflow causes an error when publishing a new branch #6526

Closed
JamesIves opened this issue Jan 2, 2019 · 14 comments

Comments

@JamesIves
Copy link

@JamesIves JamesIves commented Jan 2, 2019

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:

screen shot 2019-01-02 at 3 10 53 pm

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.

@shiftkey

This comment has been minimized.

Copy link
Member

@shiftkey shiftkey commented Jan 2, 2019

@JamesIves thanks for the report, but I'm not sure there's anything that GitHub Desktop can do with this error:

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'

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.

@shiftkey shiftkey closed this Jan 2, 2019
@j-f1

This comment has been minimized.

Copy link
Member

@j-f1 j-f1 commented Jan 3, 2019

The push works fine from the git CLI, so I think it’s trying to stop OAuth apps from deleting workflows.

@shiftkey

This comment has been minimized.

Copy link
Member

@shiftkey shiftkey commented Jan 3, 2019

Thanks @j-f1 for the extra context!

@dkrutsko

This comment has been minimized.

Copy link

@dkrutsko dkrutsko commented Jan 9, 2019

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 the git command line or edit/delete the file on github.com. Adding /.github/main.workflow to .gitignore helps 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.

@cclauss

This comment has been minimized.

Copy link

@cclauss cclauss commented Feb 11, 2019

Was this closed because there was a solution found? I am having the same issue.

@iAmWillShepherd

This comment has been minimized.

Copy link
Contributor

@iAmWillShepherd iAmWillShepherd commented Feb 11, 2019

Was this closed because there was a solution found? I am having the same issue.

@cclauss, #6526 (comment), explains why it was closed here.

@saxinte

This comment has been minimized.

Copy link

@saxinte saxinte commented Feb 12, 2019

this issue is still happening and is very annoying

@cclauss

This comment has been minimized.

Copy link

@cclauss cclauss commented Feb 12, 2019

@saxinte See cclauss/Upgrade-to-Python3#1 for a workaround that worked for me.

@euroclydon37

This comment has been minimized.

Copy link

@euroclydon37 euroclydon37 commented Mar 14, 2019

Just to clarify... everyone seems to blame the fact that the main.workflow file is being edited. But that isn't the case for me. That file was untouched.

@cclauss

This comment has been minimized.

Copy link

@cclauss cclauss commented Mar 14, 2019

Reread cclauss/Upgrade-to-Python3#1 (comment)

You currently need to delete the workflow.main file for your PR to be accepted.

@ys

This comment has been minimized.

Copy link

@ys ys commented Mar 16, 2019

What you can do also is switch to a git URL over an HTTP url for git. It works

@nicolas-marcq

This comment has been minimized.

Copy link

@nicolas-marcq nicolas-marcq commented Oct 16, 2019

For other Googler who fall here. It work with HTTPS if you use an access token

@molnard

This comment has been minimized.

Copy link

@molnard molnard commented Nov 20, 2019

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.

@cclauss

This comment has been minimized.

Copy link

@cclauss cclauss commented Nov 20, 2019

A pull request Action on a forked repo has extremely limited rights. Try seeing what you can do with the push that will happen afterwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.