What is the best way to have a shared local repo on our production server?
Asked by David Benjamin:

Hi,

We are hosting our site on a local server and want to be able to have multiple, different, users able to log into the server and pull the master repo, hosted at Bitbucket, whenever there is an update. What would be the best way to go about doing this?

Thanks for any help or suggestions you can offer.

David


Answers:
author: Caroline R
body: Hi, [@David Benjamin](/t5/user/viewprofilepage/user-id/4876611), welcome to the community!

In order to have multiple users working on a repository hosted in Bitbucket Cloud, you just need to add them to this repository. After that, they will be able to clone this repo to their local machines, work on it locally, and then push their changes to the remote repository.

In order to add a user to a repository, you can follow one of these two options:

* Add users directly to the repository you want them to have access to:

  * Open your repository in Bitbucket Cloud \> go to **Repository settings** \> **User and group access**

  * Select **Add members**

  * Add the email address of the users you would like to add to this repo and select which type of access you want to grant to this group

  * They will receive an invitation to join this repository

<!-- -->

* Create a group and add the users to this group:

  * Access your workspace in Bitbucket \> go to **Settings**

  * Open **User groups** \> **Create group**

  * Fill in the required fields and click on **Confirm**

  * Open the group \> go to **Add member**

  * Inform the email address of the users you would like to add to this group

  * Open your repository \> **Repository settings** \> **User and group access**

  * Select **Add members** \> add the group you have created and select which type of access you want to grant to this group

Besides that, we have a great Git tutorial, in case you would like to read more about that:

* [Learn Git with Bitbucket Cloud](https://www.atlassian.com/git/tutorials/learn-git-with-bitbucket-cloud)

I hope this helps, but do let me know if you have any questions.

Kind regards,   
Caroline

comments: author: David Benjamin
body: Hi [@Caroline R](/t5/user/viewprofilepage/user-id/3934006),

Thanks for the welcome!

I think that I need to clarify my question. What I am asking is how to set up a shared **local** repository on a server (if that is possible ?\\_(?)_/? ). This would allow two separate users to enter the local directory where the repository is housed, pull from the origin's master repository, and merge if needed.


author: Caroline R
body: Hi, David, thanks for the additional information.

I understand that you would like to know how to have the clone directory accessed by different local users, is that correct? If that's the case, this is a little bit out of our scope, as this is related to your OS. I believe the following links might help you:

* <https://stackoverflow.com/questions/3242282/how-to-configure-an-existing-git-repo-to-be-shared-by-a-unix-group>

* <https://stackoverflow.com/questions/7268560/change-git-repository-to-shared>

Kind regards,   
Caroline


author: David Benjamin
body: Thanks Caroline! Sorry to be out of scope but I appreciate your help in finding direction.

Best,

David


Tags: bitbucket-cloud

cloud