# GitHub

Baton GitHub Connector - Sync users, teams, repositories, and permissions from GitHub

## Prerequisites

- A Mesh administrator account with permission to manage connectors.
- `orgs` (optional) — Comma-separated list of GitHub organization names to sync (optional - syncs all accessible orgs if not specified)
- `enterprises` (optional) — Comma-separated list of GitHub enterprise slugs to sync enterprise roles (optional - requires enterprise admin)
- `instance_url` (optional) — GitHub instance URL for GitHub Enterprise Server (defaults to https://github.com for GitHub.com)
- `sync_secrets` (optional) — Whether to sync repository secrets (default: false)
- `omit_archived_repositories` (optional) — Skip syncing archived repositories (default: false)
- Credentials for authentication: token (stored write-only).

## Authentication

**Method:** Bearer token

Mesh authenticates with a token (personal access token, API token, or bot token).

| Field | Required | Secret | Description |
| --- | --- | --- | --- |
| `token` | Yes | Yes (write-only) | GitHub Personal Access Token (PAT) - required for authentication |

## Capabilities

<CapabilityMatrix
  capabilities={[
    { name: "Identity & entitlement sync", supported: true },
    { name: "Writeback / remediation", supported: false, notes: "Read-only" },
  ]}
/>

## Data model

_This information is not yet available from the connector schema._

## Setup

1. Gather the required value: `orgs`.
2. Gather the required value: `enterprises`.
3. Gather the required value: `instance_url`.
4. Gather the required value: `sync_secrets`.
5. Gather the required value: `omit_archived_repositories`.
6. Create the required credentials in the source system: token.
7. In Admin → Connectors, add the connector and enter its configuration.
8. Save and run an initial collection.

## Troubleshooting

_This information is not yet available from the connector schema._
