A person in my company who's an admin on the company's VSTS project created a repo for me, and granted me all permissions on the master
branch.
Now I need to run BFG Repro-Cleaner on my repo. It worked great locally, but when I tried to git push
my mirrored clone, I got:
! [remote rejected] user/<someone_else>/<branch> -> user/<someone_else>/<branch> (TF401027: You need the Git 'ForcePush' permission to perform this action. Details: identity <my identity>, scope 'branch'.)
! [remote rejected] refs/pull/<number>/merge -> refs/pull/<number>/merge (TF401027: You need the Git 'ForcePush' permission to perform this action. Details: identity <my identity>, scope 'branch'.)
error: failed to push some refs to 'https://<repo>'
What permissions should I ask my admin to grant me so I can complete this? How would she do that from VSTS web UI?
To force a push to only one branch, use a + in front of the refspec to push (e.g git push origin +master to force a push to the master branch). See the <refspec>... section above for details. Force an update only if the tip of the remote-tracking ref has been integrated locally.
To set Force push permission for a branch, it’s located in Branch Security. If you are an administrator for the team project, you can also set it by yourself. Detail steps of setting as below:
In the VSTS team project -> Code Tab -> selected the repo you are working for -> Branches Tab -> select the branch you want to set force push permission -> …
button -> Branch Security -> set the group you are in or add your account as user -> set Force push to Allow -> save changes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With