LATEST 🚀 Welcome to Upgradix by Shrash Studio – Your destination for free technology learning and career growth.
🕘 Updated:
Git & GitHub

GitHub Organizations and Teams – Enterprise Repository Management

GitHub Organizations help companies manage repositories, members and permissions from one central place. Teams help organise developers based on departments or responsibilities.

GitHub Organizations and Teams – Enterprise Repository Management

When a software project grows from a few developers to multiple teams, managing repositories through individual GitHub accounts becomes difficult. Companies need a central place to manage projects, people, permissions, and security. This is where GitHub Organizations and Teams become important.

What you will learn
  • What GitHub Organizations are and why companies use them.
  • How teams organise developers and manage repository access.
  • How organization roles differ from repository permissions.
  • How nested teams and permission inheritance work.
  • How to create an organization, teams, and repository access.
  • Enterprise-level access management practices.

1. Why Do Companies Need Organizations?

Imagine a company developing a banking platform. The engineering department has separate teams for payments, customer accounts, security, and infrastructure. Each team works on different repositories, but some repositories must be shared across teams.

If every repository belongs to an individual developer, the company may face ownership, access, and continuity problems. When a developer leaves, the company should not lose control of its source code or project administration.

A GitHub Organization solves this problem by providing a shared account that owns repositories and manages members, teams, and permissions centrally.

Individual accountPersonal repositories and individual collaboration.
OrganizationCentral ownership of company repositories and members.
TeamsGroups of people organised by responsibility.
Repository permissionsControlled access based on each team's work.
Remember: A GitHub Organization is not the same as a Git repository. An organization manages people and resources; repositories contain the actual project files, history, issues, and pull requests.

2. Understanding Organization Structure

A GitHub Organization can contain multiple repositories and teams. Organization owners manage the organization, while members collaborate according to their assigned permissions.

Acme Engineering GitHub Organization Organization Owners Organization administration Engineering Teams People grouped by function Organization Members Developers and contributors Payments Team Payments API Accounts Team Customer Accounts Platform Team Shared Infrastructure payments-api customer-accounts platform-services

Organization structure: central ownership, team-based collaboration, and repository access.

For example, the Payments Team can be given access to the payments repository without automatically giving it access to every private repository in the organization.

3. Organization Roles and Responsibilities

Organization roles define what a person can manage at the organization level. They are different from repository roles, which control what someone can do inside a particular repository.

Role Main responsibility
Owner Full administrative control over the organization and its repositories.
Member Standard organization membership with access based on assigned permissions.
Billing Manager Manages billing settings and subscription details.
Security Manager Manages organization and repository security policies and alerts, where supported.
Moderator Helps moderate organization discussions and community content.
Team Maintainer Manages specific team settings and membership responsibilities.

GitHub also provides additional predefined and custom organization roles depending on the product plan and available features. A role should be selected according to the responsibility, not just the person's job title.

Important distinction: An organization owner has broad administrative access. A team maintainer manages a team, but does not automatically become an organization owner.

4. Repository Permission Levels

Repository roles control what users and teams can do in a repository. GitHub provides several permission levels for organization repositories.

Permission Typical usage
Read View and discuss project code without pushing changes.
Triage Manage issues and pull requests without write access to code.
Write Contribute code and push changes to permitted branches.
Maintain Manage repository activities without access to certain sensitive or destructive actions.
Admin Manage repository settings, access, and other administrative operations.

Some organizations may also have a Moderate repository role and, on GitHub Enterprise Cloud, custom repository roles. Available permissions can depend on the plan and feature configuration.

Consider this example:

Team Repository Permission
Payments payments-api Write
Payments customer-accounts Read
Platform platform-services Maintain
Security payments-api Read
Engineering Leads payments-api Admin

This arrangement gives each team the access required for its work instead of granting every developer administrator permissions.

5. How Teams Simplify Access

Teams are groups of organization members. Instead of assigning repository permissions separately to every developer, administrators can grant access to a team.

For example, when a new developer joins the Payments Team, adding that person to the team can provide access to the repositories already assigned to the team.

Nested teams and inheritance

GitHub supports nested teams to represent a company's reporting or engineering structure. A parent team can have multiple child teams, and a child team can have only one parent.

Engineering Parent team · Write access Payments Inherits Write access Accounts Inherits Write access Platform Inherits Write access payments-api accounts-api platform-services

Child teams inherit the parent's repository permissions. Each team can also receive additional direct access.

If the Engineering parent team receives Write access to a repository, its child teams inherit that access. This makes permission management easier for large teams.

Watch out for inherited permissions: Changing or removing a parent's repository access can affect all its child teams. You must manage inherited access at the parent team level.

6. Creating an Organization

Let's create an organization for a sample company called acme-engineering.

Step 1 – Open GitHubSign in to your GitHub account and open the organization creation page.
Step 2 – Create the organizationSelect the appropriate plan and enter the organization name and contact details.
Step 3 – Configure the organizationReview organization settings, repository creation policies, member permissions, and security requirements.
Step 4 – Invite membersInvite developers using their GitHub usernames or email addresses.
Step 5 – Create repositories and teamsCreate repositories for your projects and organise members into teams based on responsibilities.

Organization owners can manage members, invitations, teams, repository policies, and other organization settings from the organization settings area.

7. Creating Teams and Assigning Access

Assume the organization has three teams: Payments, Accounts, and Platform. You can create each team from the organization's Teams section.

  1. Open your GitHub organization.
  2. Select the Teams tab.
  3. Choose New team.
  4. Enter the team name and description.
  5. Choose the visibility setting.
  6. Add organization members to the team.
  7. Assign the team access to the required repositories.

Teams can be visible or secret. Visible teams can be viewed and mentioned by organization members. Secret teams are visible only to their members and organization owners.

Assign repository permissions

Open the repository's settings, find the team and people access section, and add the required team with an appropriate permission level.

For example, the Payments Team can receive Write access to payments-api, while the Security Team receives Read access for review.

8. Managing Teams with GitHub CLI

For automation, administrators can use GitHub CLI's gh api command to call GitHub REST API endpoints. This is useful when creating teams or assigning repository permissions as part of an administrative script.

First, authenticate with an account that has the required organization permissions.

Terminal – Authenticate with GitHub CLI
gh auth login
gh auth status

Create a team using the GitHub REST API through GitHub CLI:

Terminal – Create a team
gh api --method POST orgs/acme-engineering/teams \
  -f name=payments \
  -f privacy=closed

The command sends a request to create a team named payments. The closed privacy setting creates a visible team.

Next, assign the team Write permission on the payments-api repository:

Terminal – Assign repository permission
gh api --method PUT \
  orgs/acme-engineering/teams/payments/repos/acme-engineering/payments-api \
  -f permission=push

In the API, push represents the repository's Write permission.

Prerequisites: Replace the sample organization and repository names with your actual values. The authenticated account or token must have the required organization and repository permissions. API access may also be restricted by organization policies.

9. How Enterprise Access Works

Large organizations often need more than basic team and repository management. GitHub Enterprise Cloud provides additional capabilities for central administration and identity management, depending on the organization's subscription and configuration.

Identity ProviderCentral identity and group management.
Enterprise AccountEnterprise-wide policies and administration.
GitHub OrganizationRepositories, members, and organization settings.
Teams and RepositoriesTeam membership and repository-level access.

Important enterprise capabilities

  • Single sign-on (SSO): Connect supported identity providers to manage authentication.
  • Team synchronization: In supported configurations, synchronize organization teams with identity-provider groups.
  • Audit logs: Review administrative and security-related activities.
  • Enterprise policies: Apply supported policies across organizations.
  • Centralized administration: Manage enterprise-level settings and access.

For example, when an employee moves from the Payments department to Platform, an organization using supported identity-provider synchronization can update team membership through its identity management process.

Enterprise does not mean unrestricted access. Enterprise capabilities vary by GitHub product, subscription, identity provider, and configuration. Always verify the feature availability and security requirements before designing an access-management process.

10. Organization Security Best Practices

Organization management is not only about creating teams. It is also about protecting source code, credentials, and production infrastructure.

  • Follow the principle of least privilege. Grant only the permissions required for each responsibility.
  • Keep the number of organization owners small and controlled.
  • Use teams instead of repeatedly granting individual repository access.
  • Require multi-factor authentication where appropriate.
  • Configure SSO and identity-provider synchronization when supported and required.
  • Review outside collaborators and remove access when their work is complete.
  • Use branch protection or repository rulesets to protect important branches.
  • Require pull request reviews and status checks before merging sensitive changes.
  • Review audit logs and access assignments regularly.
  • Never store access tokens, passwords, or production secrets in source code.

11. Common Organization Management Mistakes

Mistake Better approach
Giving every developer Admin access Use the lowest repository permission that supports the work.
Creating too many organization owners Keep ownership limited to trusted administrators.
Assigning permissions one person at a time Use teams to manage access consistently.
Ignoring nested team inheritance Review parent and child team access together.
Keeping former employees as members Use an established offboarding and access-revocation process.
Sharing personal access tokens Use approved authentication and automation credentials.

12. Quick Interview Questions

1. What is a GitHub Organization?

A GitHub Organization is a shared account used by a company or group to centrally manage repositories, members, teams, and permissions.

2. What is the difference between an organization and a repository?

An organization manages people and resources. A repository stores project files, commit history, branches, issues, and pull requests.

3. What is the difference between an organization owner and a team maintainer?

An organization owner has broad administrative control over the organization. A team maintainer manages a specific team's settings and responsibilities.

4. What are repository permission levels?

Common organization repository roles include Read, Triage, Write, Maintain, and Admin. Some plans also support Moderate and custom roles.

5. What is a nested team?

A nested team is a child team under a parent team. Child teams inherit the parent's repository permissions.

6. What is the benefit of team-based access?

Administrators can manage repository access for a group instead of assigning the same permissions to each developer individually.

7. What is the difference between visible and secret teams?

Visible teams can be viewed and mentioned by organization members. Secret teams are visible only to their members and organization owners.

8. How can an organization manage enterprise identity?

Depending on its plan and configuration, an organization can use SSO and identity-provider synchronization to manage authentication and team membership.

13. Hands-On Practice

Try the following exercise to understand organization-level repository management.

  1. Create a test GitHub Organization.
  2. Create three repositories: payments-api, accounts-api, and platform-services.
  3. Create Payments, Accounts, and Platform teams.
  4. Add at least two test members to each team.
  5. Assign Write access to each team's primary repository.
  6. Give the Platform Team Maintain access to its repository.
  7. Create an Engineering parent team and explore nested team permissions.
  8. Review the access list and verify that each team has the intended permissions.
Challenge: Design an organization structure for a company with 50 developers, 5 engineering teams, and 12 repositories. Decide which teams need Read, Write, Maintain, or Admin access. Explain how you would handle a developer changing teams.

14. Key Takeaways

  • GitHub Organizations provide centralized ownership and management of company repositories.
  • Teams group organization members according to their responsibilities.
  • Organization roles and repository roles control different levels of access.
  • Nested teams help manage permissions across larger engineering structures.
  • Enterprise capabilities can support centralized identity, security, and administration.
  • Least-privilege access and regular reviews are essential for secure repository management.

In the next article, we will explore how developers use GitHub CLI and GitHub Desktop to work with repositories and perform common GitHub operations.

15. Official Learning Resources

Upgradix by Shrash Studio · Learn Technology. Build Your Future.

Comments & Ratings (0)

Log in or create a student account to comment and rate this article.

Be the first to comment on this article.