0

Suppose you have a repository Rmaster with a lot of branches created along years B1...Bn and many more that will come. Now some new users need to have Read access to a specific branch Breleases, from which they also could create new branches Bfix1...Bfixn.

In my Bitbucket repository I can only set Write right but anyone that can access the repository has automatically Read rights to every branch. I want to avoid this; I need that the new user can only read the Breleases branch and their Bfix1...Bfixn branches they create and no others.

So, I'd like to create a new repository Rreleases, linked somehow with Rmaster, in order to:

  1. Have the (Rreleases)Breleases that maps exactly the (Rmaster)Breleases and no other branches of Rmaster

  2. Have new Branches created in Rmaster not visible in the Rreleases

  3. Have the new releases merged from central team in the (Rmaster)Breleases automatically transferred in the (Rreleases)Breleases

  4. Let new users to create their Bfix1...Bfixn branches in Rreleases without affecting the Rmaster.

  5. Force the new users to do a Pull Request to (Rreleases)Breleases when they need to push something (the best would be to also generate an automatically PullRequest to (Rmaster)Breleases)

I don't want that the new users need to execute any strange git command to accomplish this. I expect to manage this by configuring the two repositories.

Off course my first idea is to create the Rreleases as fork of Rmaster, but from first tests I see the point 1 and 2 need to be done manually (should I use Jenkins maybe?) and point 3 sometimes doesn't works, for instance when I merge a Pull request from (Rreleases)Bfix1 in the (Rmaster)Breleases) I can't see it in the (Rreleases)Breleases.

I have also seen something similar to what i need here: https://stackoverflow.com/a/60603072. I don't understand it completely and I haven't had time to test it yet, but it looks it works on the clone of the Rreleases not on the Rreleases itself so is not a configuration that I (as Rreleases administrator) can done once for all.

Another easy solution would be to hide (so no Read rights) the branches B1...Bn to the group of the new user, but as I said, in Bitbucket I haven't found this option.

I expect my need is very common so probably exists a stupid solution I don't know.
Do you have any suggestion?

Claudio
  • 1
  • 1

0 Answers0