Skip to main content

此版本的 GitHub Enterprise 已停止服务 2022-10-12. 即使针对重大安全问题,也不会发布补丁。 为了获得更好的性能、更高的安全性和新功能,请升级到最新版本的 GitHub Enterprise。 如需升级帮助,请联系 GitHub Enterprise 支持

Creating teams

Teams give organizations the ability to create groups of members and control access to repositories. Team members can be granted read, write, or admin permissions to specific repositories.

Teams are central to many of GitHub's collaborative features, such as team @mentions to notify appropriate parties that you'd like to request their input or attention. For more information, see "Roles in an organization."

A team can represent a group within your company or include people with certain interests or expertise. For example, a team of accessibility experts on your GitHub Enterprise Server instance could comprise of people from several different departments. Teams can represent functional concerns that complement a company's existing divisional hierarchy.

Organizations can create multiple levels of nested teams to reflect a company or group's hierarchy structure. For more information, see "About teams."

Creating a team

A prudent combination of teams is a powerful way to control repository access. For example, if your organization allows only your release engineering team to push code to the default branch of any repository, you could give only the release engineering team admin permissions to your organization's repositories and give all other teams read permissions.

  1. 在 GitHub Enterprise Server 的右上角,单击� 的个人资料照片,然后单击“� 的组织”。 贵组织在配置文件菜单中
  2. 单击您的组织名称。 组织列表中的组织名称
  3. 在组织名称下,单击 “团队”。 “团队”选项卡
  4. 在“团队”选项卡的右侧,单击“新团队”。 新团队按钮
  5. 在“Create new team(创建新团队)”下,输入新团队的名称。 团队名称字段
  6. (可选)在“Description(描述)”字段中输入团队的描述。 团队描述字段
  7. 决定团队是可见还是机密。 可见性选项,包括可见和机密
  8. (可选)如果要创建子团队,请使用下拉菜单为新团队选择父团队。 列出组织现有团队的下拉菜单
  9. 单击“创建团队”。

Creating teams with LDAP Sync enabled

Instances using LDAP for user authentication can use LDAP Sync to manage a team's members. Setting the group's Distinguished Name (DN) in the LDAP group field will map a team to an LDAP group on your LDAP server. If you use LDAP Sync to manage a team's members, you won't be able to manage your team within your GitHub Enterprise Server instance. The mapped team will sync its members in the background and periodically at the interval configured when LDAP Sync is enabled. For more information, see "Enabling LDAP Sync."

You must be a site admin and an organization owner to create a team with LDAP sync enabled.

作为优化配置的一部分,LDAP 同步不会� 输� 的嵌套团队结构。 要创建子团队与父团队的关系,必须手动重新创建嵌套团队结构并将其与相应的 LDAP 组同步。 有关详细信息,请参阅“创建团队”。


  • LDAP Sync only manages the team's member list. You must manage the team's repositories and permissions from within GitHub Enterprise Server.
  • If an LDAP group mapping to a DN is removed, such as if the LDAP group is deleted, then every member is removed from the synced GitHub Enterprise Server team. To fix this, map the team to a new DN, add the team members back, and manually sync the mapping.
  • When LDAP Sync is enabled, if a person is removed from a repository, they will lose access but their forks will not be deleted. If the person is added to a team with access to the original organization repository within three months, their access to the forks will be automatically restored on the next sync.
  1. Ensure that LDAP Sync is enabled.
  2. 在 GitHub Enterprise Server 的右上角,单击� 的个人资料照片,然后单击“� 的组织”。 贵组织在配置文件菜单中
  3. 单击您的组织名称。 组织列表中的组织名称
  4. 在组织名称下,单击 “团队”。 “团队”选项卡
  5. 在“团队”选项卡的右侧,单击“新团队”。 新团队按钮
  6. 在“Create new team(创建新团队)”下,输入新团队的名称。 团队名称字段
  7. Search for an LDAP group's DN to map the team to. If you don't know the DN, type the LDAP group's name. GitHub Enterprise Server will search for and autocomplete any matches. Mapping to the LDAP group DN
  8. (可选)在“Description(描述)”字段中输入团队的描述。 团队描述字段
  9. 决定团队是可见还是机密。 可见性选项,包括可见和机密
  10. (可选)如果要创建子团队,请使用下拉菜单为新团队选择父团队。 列出组织现有团队的下拉菜单
  11. 单击“创建团队”。