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

# ETL: GitHub Integration

> How to connect an Integrate.io ETL account to a GitHub repository and use Sync to GitHub to commit packages and workflows to it.

The GitHub integration links an Integrate.io ETL account to one GitHub repository. Once linked, **Sync to GitHub** commits a package or workflow to a branch of that repository as JSON, so every change is versioned, reviewable and traceable in Git. It is also the starting point for [promoting packages from Dev to QA and Prod](https://www.integrate.io/docs/etl/promoting-packages-with-github.md) through pull requests.

> [!NOTE]
>
> The GitHub integration is enabled per account. Contact [Integrate.io support](mailto:support@integrate.io) to turn it on, together with package JSON export (the source control feature) on the account that syncs, since Sync to GitHub exports packages. Once it's on, **Source Control** appears under **Settings > Account**.

## How It Works

| Piece | What it does |
| :- | :- |
| Integrate.io GitHub App | Installed on the GitHub account or organization that owns the repository. You choose which repositories it can access. |
| Source Control settings | Link this account to one repository the App can access, and choose the branch packages are committed to. |
| Sync to GitHub | Commits the last saved version of a package (and, for a workflow, the packages it runs) to that branch. |
| `integrate-io.json` | An index in the repository listing each synced package and the account it comes from. Sync to GitHub maintains it. |

Packages are committed as `packages/<name>.json`. The file name comes from the package name when it's first synced and stays the same if the package is renamed later. Secret **values** are never exported: package files carry secret names only.

One account syncs to a repository. Other accounts can link the same repository (for example, QA and Prod accounts in a [promotion](https://www.integrate.io/docs/etl/promoting-packages-with-github.md)), but they are read only and can't sync.

## Requirements

* The account has the GitHub integration enabled, and the account that syncs also has package JSON export (see the note above).
* To connect, disconnect or change the repository, you need to be an account owner or admin, or have a custom role that includes the `manageGitIntegration` permission. Other members can see the connection status.
* To install the GitHub App, you need to be the owner of the GitHub account, or an owner of the GitHub organization. Organization members can request the installation, and an owner approves it.

## Connect a Repository

**1. Open Source Control**

In Integrate.io, go to **Settings > Account > Source Control**.

**2. Connect GitHub**

Click **Connect GitHub**. A GitHub window opens and asks you to authorize the Integrate.io GitHub App.

* If the App is installed on exactly one GitHub account you can access, it's linked straight away.
* If it's installed on several, choose one under **Choose a GitHub account** and click **Use this account**.
* If it isn't installed yet, GitHub asks you to install it. Choose the account or organization that owns the repository, select **Only select repositories**, pick the repository, and click **Install**.

To install the App on a different GitHub account than the one it's on, click **Install the App on another GitHub account** next to **Connect GitHub**.

**3. Choose the repository**

Under **Repository**, pick the repository from the list. If it isn't listed, type its name (`owner/name`, or a GitHub URL) and choose the **Find ... on GitHub** row that appears in the list. If it still isn't found, click **Repository access** to open the App's settings on GitHub, add the repository there, and reload the list.

**4. Choose the branch**

Enter the branch packages are committed to, for example `dev`. You can pick an existing branch or type a new one; a new branch is created from the repository's default branch. An empty repository first gets a `README.md` and an `integrate-io.json` on its default branch.

**5. Use this repository**

Click **Use this repository**. The status changes to **Connected**, and the page shows the GitHub account, repository and branch.

> [!TIP]
>
> Use a dedicated private repository for Integrate.io packages, and give the App access to that repository only. The App can link any repository it has access to, so the repositories you select on GitHub decide what an account can connect to.

## Sync a Package to GitHub

You can sync from the package designer or from the package list.

**1. Open Sync to GitHub**

* In the package designer, open the **Import/Export** menu and choose **Sync to GitHub**.
* In the package list, open a package's row menu and choose **Sync to GitHub**.

The option is unavailable while the package has validation errors. Fix them and save first.

**2. Add a commit message (optional)**

The dialog shows the repository and branch the package is committed to. Add a commit message if you like. If you leave it empty, the generated message is used, for example `Export from dev: customers-to-warehouse 1.6 → 1.7`. The generated line is always kept in the commit.

**3. Confirm**

Click **Sync to GitHub**. You see a notification when the commit is done, or that the package was already up to date.

What gets committed:

* The **last saved** version of the package. Unsaved changes are not included; save first to sync them.
* For a workflow, also the packages it runs, listed before the workflow in `integrate-io.json`.
* An update to `integrate-io.json` when the package is new to the repository.

Before committing, Integrate.io merges the repository's default branch into the sync branch, so changes made there (for example, updated promotion workflows) reach the sync branch.

## Change or Disconnect

| To | Do this |
| :- | :- |
| Commit to another branch | Click **Change** next to **Branch**. When [promotion](https://www.integrate.io/docs/etl/promoting-packages-with-github.md) is enabled, the branch comes from `promotion.json` instead. |
| Give the App access to another repository | Click **Repository access**, update the selection on GitHub, then reload the list. Changing it needs the GitHub account that owns the installation, or an owner of that organization. |
| Use another GitHub account | Click **Disconnect GitHub**, then **Connect GitHub** again and choose the other account. |
| Stop syncing | Click **Disconnect GitHub**. The repository and the GitHub App installation stay as they are. |

## FAQ

**Q: Does Integrate.io see all my repositories?**

No. The App sees only the repositories you select when you install it (or all of them, if you choose **All repositories**). Select only the repository you use for Integrate.io.

**Q: Are secrets or connection credentials committed?**

No. Package files contain secret names, never their values, and connections are referenced by name. Credentials stay in Integrate.io.

**Q: The GitHub window closed before connecting finished. What now?**

Click **Connect GitHub** again. GitHub skips the steps you already completed.

**Q: My repository isn't in the list.**

Type its name in the repository list and choose the **Find ... on GitHub** row. If it's still not found, the App doesn't have access to it: click **Repository access** and add it on GitHub.

**Q: Can two accounts sync to the same repository?**

One account syncs to a repository. Other accounts can link it read only, which is how QA and Prod accounts join a promotion.

## Related

> **[Promoting Packages with GitHub](https://www.integrate.io/docs/etl/promoting-packages-with-github.md)**

> **[Import or Export Package JSON](https://www.integrate.io/docs/etl/how-do-i-import-or-export-a-packages-json-source-code.md)**

> **[Package Version Control](https://www.integrate.io/docs/etl/how-do-i-use-package-version-control.md)**

> **[Migrating from Development to Production](https://www.integrate.io/docs/etl/migrate-from-development-to-production.md)**


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.