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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Preventing tag creation

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

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
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

1,926 views 0 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you