When setting up git infrastructure, companies must decide between using a single or multiple organizations. GitHub, Gitlab, Bitbucket and Azure DevOps all offer different ways to split a company into organizations. Generally, a single organization facilitates communication and information sharing between team members and reduces the amount of administrative work. Multiple organizations, on the other hand, come with greater administrative workload but provide better security isolation.
The process of organizing, versioning, and maintaining code repositories—otherwise known as source code management—is a key component of modern software development that speeds up and streamlines the software development lifecycle.
Typically implemented as a Git hosting service with multiple features, commercial solutions like GitHub, Azure DevOps, BitBucket, and GitLab can help you manage your code repositories more efficiently. Still, when it comes to organizing a large number of repositories, things can get complicated. This is especially true in enterprises with large development organizations working across code repositories.
DevOps is concerned with making sure developers have the access they need and that code is maintained and versioned correctly, but it is important to ensure that only the necessary people have access to code. These interdependent priorities raise an important question: Is it better to manage code in a single organization or multiple organizations within the code management software?
In this blog post, we explore the pros and cons of both with the four most popular web-based code management solutions: GitHub, GitLab, BitBucket, and Azure DevOps.
When it comes to source code management and Git hosting, GitHub is arguably the most dominant player on the market. It offers multiple options for structuring organizations within your enterprise, the most popular being the ability to choose between a single or multiple GitHub organizations.
In a single-organization setup, all code repositories are maintained under one “GitHub organization.” Here, there are two ways to manage access to the code: direct access or team access.
With direct access, the simplest available structure, all repositories can be accessed directly by all developers—without the need for team-level permissions. This approach generally works well for small companies and startups.
In contrast, team access allows only members of certain teams to access the desired repositories, depending on the configuration.
GitHub itself actually advises companies to minimize the number of organizations used to manage code.
In a multiple-organization setup, all code repositories are maintained under multiple “GitHub organizations.” Just as with a single organization, each organization within this setup can use direct or team access independently.
It is also possible to set up GitHub using multiple organizations that implement different access methods. This allows you to benefit from the ease of communication a single organization offers, without having to share repositories for global access.
When using organization-level policies and configuration, governance efforts will be duplicated for every added organization. Though this offers greater flexibility to customize policies and configurations, it also involves the responsibility of managing multiple organizations.
As of the writing of this post, the GitLab organization feature is still in development. By using a top-level namespace, however, you can replicate a single organization setup; for a multi-organization setup, you can use multiple accounts.
GitLab uses namespaces to manage projects and repositories, allowing you to organize and categorize projects—which can be a part of one or many namespaces. Namespaces based on your username are for personal use. Group/subgroup namespaces help teams manage multiple projects. Each subgroup has its own settings and URL and can inherit the parent group settings.
(Note: Subgroups are sometimes referred to as “groups” as well, and the two terms should be considered synonymous within the context of this article.)
Next, let’s take a look at how to implement single- and multiple-organization setups in GitLab.
Here, you can use a single top-level namespace group with namespaces access. This single-organization setup is very common in small and mid-size companies.
The other option for organizing codebases in large organizations is to use multiple company accounts/organizations. This can be done with or without group namespaces, depending on how many developers and repositories will be used in each account.
BitBucket, a popular code management platform from the makers of Jira and Confluence, offers users the ability to manage their code in workspaces, projects, and user groups.
BitBucket organizes projects and code in its software through:
Because BitBucket does not have the concept of an organization built into the software as GitHub does, in this section, we will be mapping workspaces to organizations.
With a single organization, repositories are located in the same workspace for the entire company. These are then divided into projects.
When using a multi-organization setup, the company’s many repositories are divided into multiple workspaces.
Much like the other code management platforms, Azure DevOps enables teams to organize user permissions and other configurations. Azure DevOps recommends creating a team for each distinct product or feature team.
The platform also implements the project concept through a container for repositories, CI/CD, and backlogs.
Let’s review how to manage code in Azure DevOps via a single organization and multiple organizations.
This is the recommended setup for getting started with Azure DevOps. It is generally the ideal setup for small organizations.
In this scenario, unlike the previous setup, the company can move its various repositories under different projects. This would likely be the ideal solution for a medium- to large-size organization.
In this final setup, the company uses many organizations to manage the development effort. Within each of these organizations, there can be multiple projects and teams.
The decision to manage code in a single organization or across multiple organizations depends on the specific size, requirements, and objectives of your development team and the company as a whole.
GitHub, GitLab, BitBucket, and Azure DevOps offer different options for managing code for larger organizations, each with its own advantages and disadvantages. It is essential to evaluate these approaches carefully and choose the one that best aligns with your team's requirements. It is also important to consider the recommendations from the solution providers themselves; for instance, GitHub advises limiting the number of organizations.
For most solutions, managing code in a single organization can facilitate collaboration and improve visibility with less administrative work. Managing code across multiple organizations, on the other hand, can provide better isolation but may lead to administrative overload. It is up to each development team to determine which approach works best for them.
Need help managing your organizations? View all of your organizations in one place with Arnica. Get the flexibility you need to manage your policies and rules with ease, from the organization level all the way down to the branch level. Book your free demo today.