2

We have a private repo on bitbucket for a client and as part of their disaster recovery strategy, they'd like to be able to access the codebase. Is there a way to make the master branch of the repo available to them without giving access to all of the pull requests, commits and branches?

I can set up a user with readonly access on the repo but they can still view everything and comment in pull requests etc. and I'd prefer if the dev team could comment freely in there and prototyped code or tracers were kept private.

What's the best practice for sharing production code with a client/customer? Can I share just one branch with another bitbucket or github account?

Bat
  • 255
  • 3
  • 12

1 Answers1

1

Per the Atlassian documentation, read access grants the following:

View, clone, and fork the repository code. All public repositories 
grant all Bitbucket Cloud users read permissions automatically. 
Read access on a repository also allows users to create issues, 
comment on issues, and edit wiki pages.

Which sounds like just what you want except that it's all the branches in that repo, not just master. Probably the only way to provide the 'public' view you want is clone the master branch to a separate repo. Atlassian doesn't provide the granularity of permissions to fine tune it further. So you would need a process to keep the "public" master in synch with the real master.

WPrecht
  • 1,340
  • 1
  • 17
  • 29
  • Thanks - I thought as much - have tried creating an orphan branch from master and pushing that up to a separate repo but it's quite fiddly to keep the commit number. Now looking at a fork that can be synced but may run into problems if master is force pushed for any reason I think... – Bat Apr 26 '16 at 16:19