22

We're 5 people working on the same projects and have several GIT-repositories in Bitbucket. Each user has their own Bitbucket account. I'm looking for the best-practice approach to having some sort of team or organization feature so that we can all work on the same repositories? As a use case, when I clone a repository it's not possible for other users to push to the same repository. I hope there's some way of solving this without having everyone use the same user account.

I hope this was properly explained.

Many thanks!

Fredrik
  • 1,741
  • 4
  • 24
  • 40

2 Answers2

25

Bitbucket just deployed their Teams feature, similar to GitHub's organizations.

This allows you to administer a group account without having to logout from your account and login to it.

Legion
  • 1,457
  • 11
  • 15
4

Update May, 30th 2012: as Legion mentions in his answer, Team Up with Bitbucket describes the Bitbucket Teams, in order to create a shared account.


Original answer (May, 22sd 2012)

With Bitbucket permissions, you can grant write access to other users for each of your repositories.

The user that creates a repo is known as its owner.
Only an owner can delete a repo. You can create unlimited Bitbucket public or private repositories.

  • A public repository is visible to all bitbucket users.
  • A private repository is visible only to its owner and users that owner gives permissions to. This means an unauthorized user cannot clone or view the contents of a private repo even if they know the repo's URL.

Repository owners can grant other users explicit access to the repository.
An owner can allow 5, 10, 25, 50, or an unlimited number of users access to repositories under his or her control.
The owner always counts as one user.
The owner configures the permissions associated with each user with access. bitbucket supports the following permission levels:

  • read View the repository contents. All public repositories grant all bitbucket users read permissions automatically.
  • write Contribute to the repository by pushing changes directly from a repository on a local machine.
  • admin Do everything a repository owner can do, except delete the repository. This means administrators can:
    • Change repository settings.
    • Add, change, and remove user permissions.
    • Give other users administrator access.
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I see that my problem was not properly explained. Lets say we have 2 users working on the same repository in different branches. User 1 pushes his changes to the repository, and then clones the repository on the production server. The new repository on the server is now locked to User 1's account, so User 2 doesnt have access to pull his changes. Is there a solution for this perticular situation? – Fredrik May 22 '12 at 11:46
  • @frigg that would be through a `post-checkout` hook in order to `chmod` the files: http://stackoverflow.com/questions/6210116/git-deploying-project-file-permissions-chmod (or, for a server, a `post-receive` hook) – VonC May 22 '12 at 11:55