Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Azure by (45.3k points)

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>'

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?

1 Answer

0 votes
by (16.8k points)

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.

enter image description here

enter image description here

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...