# Connect GitHub

> Part of the NocoDB documentation (Factory). Index of all pages: https://nocodb.com/llms.txt. Any docs page is available as Markdown by adding `.md` to its URL.

URL: https://nocodb.com/docs/factory/connect-github
Last updated: 2026-10-21

Connect GitHub to Noco Factory with the NocoDB GitHub App, choose the repositories that NocoAI can reach, and see what access it gets in a session.

Noco Factory connects to GitHub through the **NocoDB GitHub App**. You install the app on a GitHub account or organization, and you choose the repositories that it can reach. [NocoAI](/docs/product/noco-ai) can work only on those repositories.

The workspace **Owner** connects GitHub once for the whole workspace. After that, workspace **Creators** can [create factories](/docs/factory/create-factory) from the connected repositories.

## Before you begin

* You need the **Owner** role in the NocoDB workspace.
* You need permission to install GitHub Apps on the GitHub account or organization that owns the repositories.

## Connect GitHub from the home screen

1. On the workspace home screen, select **Dev Factory**. The **Connect your code** step opens.
2. On the **GitHub** card, click **Connect**. GitHub opens in a pop-up window, and the card shows **Waiting for GitHub**.
3. In GitHub, select the account or organization.
4. Select **All repositories**, or select **Only select repositories** and pick the repositories.
5. Click **Install**. The pop-up closes, and the **Pick a repository** step opens.

<img alt="The Connect your code step, with the GitHub card" src={__img0} placeholder="blur" />

The footer of the panel shows **Connected to GitHub as \[account]**. To manage the connection, click **Manage in Integrations**. If you are not the workspace **Owner**, the **GitHub** card shows **Ask a workspace admin to connect**.

## Connect GitHub from Integrations

You can also connect Noco Factory to GitHub on the [Integrations](/docs/product/integrations) page of the workspace:

1. In the workspace sidebar, click **Integrations**.
2. Select **GitHub** in the catalog.
3. For **Auth type**, select **GitHub App**.
4. Under **GitHub App installation**, click **Authenticate With GitHub**.
5. On GitHub, install the app on the repositories that you want to use.
6. Click **Create integration**.

Noco Factory accepts only a GitHub App connection. A GitHub connection that uses an API key or OAuth shows this error: "Code projects need a GitHub App connection. Personal tokens and OAuth connections cannot be used."

## What NocoAI can access

For each turn of a session, NocoDB gives NocoAI a short-lived GitHub token. The token:

| Property             | Value                                                                                             |
| -------------------- | ------------------------------------------------------------------------------------------------- |
| **Repositories**     | Only the repository of the factory                                                                |
| **Permissions**      | Contents (write), pull requests (write) and metadata (read)                                       |
| **Where it is kept** | NocoDB adds the token to requests that leave the machine. The token is not stored on the machine. |

With this token, `git push` and the GitHub CLI (`gh`) work in the session without a sign-in. NocoAI commits as the NocoDB App Factory bot.

NocoAI can push only to the branch of its session. It cannot push to the default branch, so changes reach the default branch only through a pull request that a person merges. See [Branches and pull requests](/docs/factory/branches-and-pull-requests).

## Remove access to a repository

To stop NocoAI from working on a repository, remove the repository from the NocoDB GitHub App installation in GitHub, or uninstall the app. Sessions of that factory then cannot start: "Access to \[repository] was revoked. Reconnect it to start a session."

NocoDB does not delete the factory, its sessions or its machines when you remove access.

## GitLab and Bitbucket

GitLab and Bitbucket are coming soon. The **Connect your code** step shows a card for each, with **Notify me**. Click **Notify me** to get a message when your provider is ready.

## Related

* [Create a factory](/docs/factory/create-factory)
* [Branches and pull requests](/docs/factory/branches-and-pull-requests)
* [Integrations](/docs/product/integrations)
* [Members and roles](/docs/factory/members-and-roles)

---

## Related pages

- [Noco Factory](https://nocodb.com/docs/factory.md): Noco Factory is the AI coding agent of NocoDB. NocoAI takes a task to its own cloud machine and branch, and returns a GitHub pull request for you to review.
- [Noco Factory and Other Coding Agents](https://nocodb.com/docs/factory/coding-agents.md): Compare Noco Factory with cloud AI coding agents such as Devin, OpenAI Codex and the GitHub Copilot coding agent, and see when Noco Factory is the right fit.
- [Create a Factory](https://nocodb.com/docs/factory/create-factory.md): Create a NocoDB factory from a GitHub repository: pick the repository on the workspace home screen, and NocoAI sets up the project in the first session.
- [Sessions](https://nocodb.com/docs/factory/sessions.md): Start a Noco Factory session to give NocoAI a coding task on a branch, a pull request or an issue, and manage sessions: rename, archive, resume and delete.
- [Live Screen and Preview](https://nocodb.com/docs/factory/live-screen-and-preview.md): Watch NocoAI work on its machine's desktop in Noco Factory with Live screen, and try the app it runs in Preview, from the side panel of a session.
- [Terminal and Files](https://nocodb.com/docs/factory/terminal-and-files.md): Run your own commands on the machine of a Noco Factory session in the Terminal tab, and read, compare and edit the repository's files in the Files tab.
- [Review Changes](https://nocodb.com/docs/factory/review-changes.md): Review the code changes of a Noco Factory session in the Changes tab, comment on lines of the diff, and send the comments back to NocoAI to fix.
- [Branches and Pull Requests](https://nocodb.com/docs/factory/branches-and-pull-requests.md): How each Noco Factory session works on its own git branch, and how NocoAI commits, pushes and opens a GitHub pull request for you to review and merge.
