Github let's you overwrite on protected branch when freshly pulled repo clone #23398
-
github let's you overwrite on protected branch when freshly pulled repo clone
this is pretty dangerous bug as it can wipe out the code if mistakenly someone f…orce pushes in main branch, request you to please look into the issue on priority. I fresh cloned a repo I am a contributor to and forgot set up fork remote to push on, instead I pushed mistakenly set my remote also to point to origin/master...
This should have been rejected since the branch is protected, but it got bypassed somehow
Command attempted: What happened: More info: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I don’t think Here is where your repository was:
Merge pull request #1861 from ceph/wip-normaldistro
build_utils.sh: Fix variable Here is where your repository went to:
build_utils: set build flags using CMakeLists of pushed branch
idea is to fetch CMakeLists.txt from pushed branch on ci >> grep for set cmake o…n libraries >> export build optional for these Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com> This is the difference:
ceph/ceph-buildHelper scripts for building the official Ceph packages - ceph/ceph-build If you look at the commits list for where you are now, you’ll see that the parent is where you were before.
You aren’t doing that, and thus Say you had:
build_utils.sh: Fix variable
Signed-off-by: David Galloway <dgallowa@redhat.com> as your Here’s a long chain of commands that you could try to follow to understand what’s happening in the basic cases:
Admittedly, the GitHub docs on allow-force-push are not end-user resilient, but I don’t have the energy to fix them. |
Beta Was this translation helpful? Give feedback.
I don’t think
--force
means what you think it means.Here is where your repository was:
Merge pull request #1861 from ceph/wip-normaldistro