> ## Documentation Index
> Fetch the complete documentation index at: https://docs.enkryptify.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GitHub

<AccordionGroup>
  <Accordion title="Prerequisites" icon="list-check">
    * An Enkryptify workspace with admin access
    * A GitHub account with admin/owner permissions on the target organization and repositories
    * Ability to install the Enkryptify GitHub App on the selected organization

    > Note: If your organization uses SAML SSO, ensure you've authorized the Enkryptify GitHub App for the org before starting.
  </Accordion>

  <Accordion title="Permissions" icon="scroll-text">
    When installing the Enkryptify GitHub App, we request only the permissions needed to create and update secrets:

    * Repository permissions:
      * Environments: read and write
      * Secrets: read and write
      * Metadata: read

    > Enkryptify can't see any values of the secrets, it only sees the names. GitHub does not allow us to see the values of the secrets.
  </Accordion>
</AccordionGroup>

## Steps to complete

<Steps>
  <Step title="Create a new sync">
    * Go to the `Syncs` tab of your project and click on `GitHub`.
  </Step>

  <Step title="Authenticate the Enkryptify GitHub App">
    * You'll be redirected to GitHub to install/authorize the Enkryptify app.
    * Select the GitHub organization to install into.

    This step is skipped if you previously connected GitHub.

    <img src="https://mintcdn.com/enkryptify-39ddac35/7M7rEiw2BfTKrSr1/images/sync/github/github-install-app.png?fit=max&auto=format&n=7M7rEiw2BfTKrSr1&q=85&s=b2673bc53661bcfd9b64a5629176e997" alt="GitHub App install authorization screen" width="2868" height="1914" data-path="images/sync/github/github-install-app.png" />
  </Step>

  <Step title="Select your GitHub repository">
    * Confirm the target repository for syncing secrets.
  </Step>

  <Step title="Map Enkryptify environment to GitHub environment">
    * Example: `main` → `production` or `develop` → `staging`.

    In private repositories of free organizations, GitHub does not allow creating custom environments, you'll only see the default environment.
  </Step>
</Steps>
