Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Preventing tag creation

Mark Noller August 4, 2020

Using "refs/tags/*" or "tags/*" is not preventing tag creation. 

https://confluence.atlassian.com/bitbucketserverkb/how-do-i-block-all-tags-from-being-pushed-to-a-repository-822021700.html

 

Ultimately I would like to force a pull request when adding a tag. But I can't seem to prevent tag creation even when removing all write and merge permissions.

 

2020-08-04_10-47-26.jpg

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 14, 2020

Hi Mark,

The documentation you linked in your question is for Bitbucket Server and I'm afraid that it is not applicable for Bitbucket Cloud.

At the moment, only users with Read permissions are prevented from pushing/creating tags. I can see that users with write access to a repo can create a tag, even if they are not allowed to push to a branch via branch permissions.

This looks like a bug so I went ahead and opened a bug report in our issue tracker:

Feel free to add yourself as a watcher by selecting the *Start watching this issue* link in the bug report if you'd like to get notified via email on updates.

We also have a feature request to restrict pushing git tags to certain users, if you'd be interested in this:

Regarding your suggestion to force a pull request when adding a tag, I'm not sure if that would work in this case.

For a pull request, you need a source and a target branch. When you attempt to push a commit to a branch you don't have access to, a new branch can be created with this new commit, and therefore a pull request from this new branch, to the one you were originally trying to push.

If you add a tag to a commit, you don't have a second branch to create a pull request from it.

Would you like to have some sort of mechanism to review tags that have been created/pushed by other users, before they are actually added to the commits?

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events