Raman Narasimhan
Raman Narasimhan

Reputation: 188

Block direct pushes to branch

My team uses both gerrit and gitlab and this sometimes causes issues when people are working on both gerrit and gitlab at same time.

While working on gerrit instead of

git push origin HEAD:refs/for/master we wrongly issue git push.

So instead of creating a changeset, the code gets automatically pushed to Remote branch.

How can we block all direct pushes to a branch in gerrit?

Upvotes: 1

Views: 290

Answers (2)

Go to:

Gerrit > All-Projects project > Access

Look at the "Push" permission at the "refs/heads/*" category. Probably your team has an "ALLOW" in this permission. Edit the project permissions to remove it or to add a "BLOCK" specific for your team.

Upvotes: 2

laplasz
laplasz

Reputation: 3497

there is an access category - push so this can be disabled for a group under the project admin site. more info can be found here

Upvotes: 0

Related Questions