Avoiding protected branches
See original GitHub issueHi,
I’d like to create a Github Action which will create and push a commit everytime a new release is created. Although the branch (push: origin main
) I’m willing to push into is protected and needs at least 2 reviews (and some additional checks), so I receive the following message (also as an admin, I can push directly to main branch):
Error: Error: Pushing to https://github.com/corpadress/repo
POST git-receive-pack (686 bytes)
remote: error: GH006: Protected branch update failed for refs/heads/main.
remote: error: 3 of 3 required status checks are expected. At least 2 approving reviews are required by reviewers with write access.
Can you provide me some hints on how to solve this issue?
I tried to provide my author_name
and author_email
for impersonating my admin rights, but it didn’t really work.
Thanks
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Protected branches - GitLab Docs
Delete a protected branch · On the top bar, select Main menu > Projects and find your project. · On the left sidebar,...
Read more >About protected branches - GitHub Docs
You can protect important branches by setting branch protection rules, which define whether collaborators can delete or force push to the branch and...
Read more >Protected branches · Project · User · Help · GitLab
Configuring protected branches · Navigate to your project's Settings ➔ Repository · Scroll to find the Protected branches section. · From the Branch...
Read more >Protecting the master branch
In your repository navigation to Settings > Branches · Under “Protected Branches” select master · Enable the following settings: Protect this branch; Require...
Read more >Best Practices for Branch Protection - DEV Community
Branch protection is part of a powerful set of configuration options that give repository administrators the ability to enforce security ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the replies, folks!
Yes using a pat works! 😃
Hi, I made it work with below configuration:
Unfortunately this commit triggers CI as expected, so I guess it’s a trade-off 😉