Push to Leo Repo Failed with error:Protected branch update failed for refs/heads/devel.

48 views
Skip to first unread message

Thomas Passin

unread,
May 7, 2020, 12:16:31 AM5/7/20
to leo-editor
Matt, thank you for the setting me up to contribute to the Leo repo.  This finally got me past the problem with my password not getting me access.  On my first attempt to push viewrendered3, after merging I got this error:

Writing objects: 100% (117/117), 48.58 KiB | 3.04 MiB/s, done. 
Total 117 (delta 89), reused 0 (delta 0)                       
remote: Resolving deltas: 100% (89/89), completed with 14 local
objects.                                                       
remote: error: GH006: Protected branch update failed for refs/he
ads/devel.                                                     
remote: error: Required status check "continuous-integration/tra
vis-ci" is expected.                                           
To https://github.com/leo-editor/leo-editor.git                
 ! [remote rejected]     devel -> devel (protected branch hook d
eclined)                                                       
error: failed to push some refs to 'https://github.com/leo-edito
r/leo-editor.git'                                              
Done


The viewrendered3 module was not in fact changed in Leo's devel branch.  In the future, I suppose I better start a new branch for each change, but I'm not sure what to do in this case.

I hope you know what to do about this. 

Tom

Matt Wilkie

unread,
May 7, 2020, 12:52:01 AM5/7/20
to leo-editor
hmmm, not sure what's going on here. How about try adding a new file that will have no prior history. It can be a blank do nothing thing that we remove later.

Matt Wilkie

unread,
May 8, 2020, 2:36:47 AM5/8/20
to leo-editor
Thomas I made some more Leo Editor org and member changes. Please try pushing again, with a new file that doesn't already exist in the repo.

-matt

Thomas Passin

unread,
May 8, 2020, 9:49:12 AM5/8/20
to leo-editor

On Friday, May 8, 2020 at 2:36:47 AM UTC-4, Matt Wilkie wrote:
Thomas I made some more Leo Editor org and member changes. Please try pushing again, with a new file that doesn't already exist in the repo.

-matt

I created a new branch tbp-test in the Leo repo.  I fetched it and checked it out in my clone.  Then I added and committed a new file dummy1.py to the extensions folder.  After that, I pushed to the Leo repo.  This worked.  I see the new file in there.

After cruising through some of the settings for repo on Github, I see that there is a branch protection rule on the devel branch.  It requires CI as a status check before merging.  I don't know how to work with that in terms of pushing and merging my own code to devel.  Perhaps I had better do all my work in my own branch, and then issue PRs from that branch?  That would mean someone else would have to do any merging, though.

Edward K. Ream

unread,
May 8, 2020, 10:56:25 AM5/8/20
to leo-editor
On Fri, May 8, 2020 at 8:49 AM Thomas Passin <tbp1...@gmail.com> wrote:

After cruising through some of the settings for repo on Github, I see that there is a branch protection rule on the devel branch.  It requires CI as a status check before merging.  I don't know how to work with that in terms of pushing and merging my own code to devel.

I haven't encountered any problems pushing directly to devel. 

Edward

Thomas Passin

unread,
May 8, 2020, 11:18:55 AM5/8/20
to leo-e...@googlegroups.com
That's what I'll try next.

[Later]  All right, pushing this new dummy file up to devel worked.  I'll delete it now.

Thomas Passin

unread,
May 8, 2020, 9:18:42 PM5/8/20
to leo-editor
And finally, I succeeded in pushing the latest version of VR3 to Leo's devel branch. 

Thanks so much to Matt and everyone who helped get this straightened out.

The main changes to VR3 were to correctly find executables like asciidoc3 that were not getting found on Windows.  It turns out that asciidoc3 gets installed into a Scripts directory on Windows but not Linux.  The new code can find this location whether or not you are running in a virtual environment.  In addition, the RsT fallback plain text rendering when docutils is not available now works.  Of course it doesn't look that great since docutils isn't rendering it, but at least it displays as it was supposed to.

Edward K. Ream

unread,
May 9, 2020, 5:16:14 AM5/9/20
to leo-editor
On Fri, May 8, 2020 at 8:18 PM Thomas Passin <tbp1...@gmail.com> wrote:
And finally, I succeeded in pushing the latest version of VR3 to Leo's devel branch. 

Thanks so much to Matt and everyone who helped get this straightened out.

I second the thanks to Matt.

Edward

Matt Wilkie

unread,
May 9, 2020, 11:35:58 PM5/9/20
to leo-editor
And finally, I succeeded in pushing the latest version of VR3 to Leo's devel branch.

Yay!! :)

Thomas Passin

unread,
May 10, 2020, 9:05:59 AM5/10/20
to leo-editor
During the long saga, someone - was it Matt? - suggested removing the credentials helper from git so that user/pw would be required for each push.  I did that.  Now that it's all working, I was able to restore the helper and I don't need to provide them each time.  On Windows, here's the command I used:

git config --global credential.helper manager

I found it on this Stack Exchange thread:

Matt Wilkie

unread,
May 11, 2020, 5:38:57 AM5/11/20
to leo-editor
Yeah that was me, good to have it in our record for how to undo also, thank you.
Reply all
Reply to author
Forward
0 new messages