> For the complete documentation index, see [llms.txt](https://sandgarden.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sandgarden.gitbook.io/docs/getting-started/connect-github.md).

# Connect GitHub

Use this page when you need to connect GitHub to Doc Holiday. If the word Source is new, start with [Concepts](/docs/overview/concepts.md). GitHub setup uses two steps: install the GitHub App for the organization, then add one repository Source for each repository Doc Holiday should read or write. Install the app first so the organization grant exists before any repository setup begins, and so later repository Sources can reuse the same install without repeating the organization prompts.

### Install the GitHub App

1. Open the GitHub setup flow and select **Install GitHub App**. That starts the organization-wide install and keeps the rest of the setup tied to the same GitHub account.
2. Choose the organization that owns the repositories you want Doc Holiday to use, then finish the GitHub prompts. GitHub then returns you to Doc Holiday with the organization already selected, which keeps the next step focused on repository setup.
3. If you are not a GitHub organization owner or app manager, select **Create Invite Link** to generate a GitHub installation invite. Copy the link and send it to an organization owner or GitHub App manager. They can open it, approve the app, and finish the install without changing the rest of your setup.

![GitHub's Install doc.holiday screen asking where to install the app](/files/mmgEYRe5kAY519mfocFp)

### Add a repository Source

1. Open the repository Source form under the installed GitHub App. Use this form for each repository that belongs in the same GitHub organization, and keep each Source separate so the health status stays easy to check later.
2. Enter a **Source Name** that makes the repository easy to identify later, especially when one organization connects several repos.
3. Select **Repository** from the picker. Doc Holiday fills in the repository and the default branch automatically. Change **Branch** only when a different branch should drive documentation.
4. Submit the form to create the repository Source. Repeat the same flow for every repository that should belong to the organization or Publication.

![The Create Source form for a GitHub Repository: repository, branch, and publishing system fields](/files/ZEjSxDV4fZGzvBHvZZvK)

If the repository list looks empty, the app install probably does not yet cover the repository you expect, or an organization owner still needs to approve access. Return to the app install and confirm that the organization grant includes the repository you want.

### Option B: use a personal access token

Use this path when the GitHub App cannot be installed for the organization, or when an admin cannot finish the app install right away. This still creates a repository Source, but it uses a token instead of the app. Choose it when the app route is unavailable and the organization still needs the repository connected. The token path asks for the same repository details, so the Source behaves the same way after setup.

1. Enter a **Source Name** that identifies the Source clearly.
2. Paste the **Personal Access Token**.
3. Enter the repository in **Repository**. Use the repository path that matches the project you want Doc Holiday to use.
4. Choose **Branch** after the repository loads, then submit the form. The branch list appears once Doc Holiday can read the repository with the token. If the token has broad access, pick the repository carefully so the Source points at the right project.

If the token can reach more than one repository, pick the one you want Doc Holiday to keep reading or writing, then keep the branch aligned with that workflow.

### Verify

Open the **Sources** page and find the GitHub Source. Check the badge beside it. A working Source shows **Healthy**. If it shows **Unhealthy**, open [Manage Connections](/docs/sources/manage-connections.md) and fix the Source before you add another repository or create a Publication. Use this check before moving on, because a healthy badge confirms the Source is ready for the next step.

### Next

Next: [Create your first Publication](/docs/getting-started/create-your-first-publication.md).
