# GitHub Teams

{% hint style="info" %}
This is an older version of the document. To view the most recent version of the document, click [here](https://docs.opsmx.com/products/orchestration-module-opsmx-enterprise-for-spinnaker-oes/additional-feature-configuration/secure-spinnaker/authorization/user-role-providers/github-teams).
{% endhint %}

## Setup GitHub Team for Spinnaker <a href="#setup-github-team-for-spinnaker" id="setup-github-team-for-spinnaker"></a>

### Overview of GitHub Teams <a href="#overview-of-github-teams" id="overview-of-github-teams"></a>

* GitHub Teams, this is a group of organization members that reflects company or groups structure with cascading access and permissions to the repositories.
* Roles from GitHub are mapped to the members under a specific organization.

### Personal Access Token <a href="#personal-access-token" id="personal-access-token"></a>

* Login to the GitHub console, as an admin user of the organization.
* Navigate to ‘Developer Settings’, under Settings and click on ‘Personal Access Tokens’
* To generate a new token Click on ‘Generate New Token’
* Provide a name for the Token. (E.g. Spinnaker-Team)
* Select a Scope of access for the users ‘read:org’
* To finalize the token creation, click on ‘Generate Token’.

### Configure GitHub Teams with Spinnaker <a href="#configure-github-teams-with-spinnaker" id="configure-github-teams-with-spinnaker"></a>

* From the above steps, ensure to have admin personal token in hand.
* Execute the below Halyard commands, to Configure GitHub Teams to Spinnaker

  ```
  TOKEN=<Admin-Token Name> # Personal access token under admin account
  ORG=<Admin Org Details> # GitHub Organization

  hal config security authz github edit \
  --accessToken $TOKEN \
  --organization $ORG \
  --baseUrl https://api.github.com

  hal config security authz edit --type github

  hal config security authz enable

  ```
