> For the complete documentation index, see [llms.txt](https://docs.brainboard.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.brainboard.co/settings/integrations/git-configuration/github.md).

# GitHub

### Configure GitHub integration

To create integration between Brainboard and GitHub:

1. Go to the [Git integration](https://app.brainboard.co/settings/integrations/git) settings page.
2. Click on `Integrations`
3. Click on `Connect with GitHub`

<figure><img src="/files/D7cmVTUWu3yzKhzrsT84" alt=""><figcaption></figcaption></figure>

You'll be redirected to the GitHub website, where you can choose the organization for which you want to configure access:

<figure><img src="/files/Y6mDlyR3wm4op7GJyKE9" alt=""><figcaption></figcaption></figure>

After selecting the organization, you are prompted to specify the repositories:

**N.B:** Brainboard requires `read-write` access to be able to do pull requests.

<figure><img src="/files/OqzQU207ijDwE9z4oQCl" alt=""><figcaption></figcaption></figure>

After selecting the repositories, you'll be automatically redirected to Brainboard Git app settings page. Now the button should have changed to `View GitHub integration`.

Once the connection is configured successfully, it will be you should it with a green indication

<figure><img src="/files/HqlhCH4jwpqZ4wD45JEM" alt=""><figcaption></figcaption></figure>

### Enable personal connection

1. Once the GitHub app integration is done you need to click on `Add connection` in `Personal connections` section. This will open the settings where you can allow Brainboard to do pull requests on your behalf by clicking on `Connect with Github`<br>

   <figure><img src="/files/1Z6HISseWq28orqH8X5e" alt=""><figcaption></figcaption></figure>

   If the Git app integration is not configured, Brainboard will display a warning as it has to be done first<br>

   <figure><img src="/files/R2aCMbDeKrdF7lQK3Kug" alt=""><figcaption></figcaption></figure>
2. The GitHub website will open in a new tab, asking you to authorize Brainboard app to access your GitHub account. Click on the `Authorize Brainboard` button:

   ![Github authorize](/files/TvElJARWT23U0aeGp3iR)
3. You will then be redirected to Brainboard personal git tokens page, with a confirmation that the GitHub connection was successful:

   ![Github\_connection\_success](/files/jKWvqmUOaVEcG5lnA27j)

### Using your own GitHub app

{% hint style="info" %}
Required if you want to integrate with GHE / GHES
{% endhint %}

Register a new app (see <https://docs.github.com/en/apps/creating-github-apps/registering-a-github-app/registering-a-github-app>) with the following information:

* Name: `Brainboard`
* Homepage URL: `https://www.brainboard.co`
* Callback URLs:&#x20;
  * `https://app.brainboard.co/settings/integrations/git/callback/github/organization`
  * `https://app.brainboard.co/settings/integrations/git/callback/github/user`
* Setup URL: `https://app.brainboard.co/settings/integrations/git`
* Webhook URL: `https://api.us1.brainboard.co/webhooks/github`
* Permissions:
  * Content: Read and write
  * Pull requests: Read and write
* Subscribe to events: none

Once created, generate a **client secret** and a **private key** then configure it in Brainboard.

<figure><img src="/files/iIoWqA0aUhGm9y1tfPBK" alt=""><figcaption></figcaption></figure>

### Edit GitHub integration

To edit the GitHub integration:

1. Go to the [Git integration](https://app.brainboard.co/settings/integrations/git) settings page.
2. Click on `Integrations`
3. Click on `Access GitHub`
4. You'll be redirected to the GitHub website, where you can edit the integration with Brainboard.

### Delete GitHub integration

To delete integration with GitHub:

1. Go to the [Git integration](https://app.brainboard.co/settings/integrations/git) settings page.
2. Click on `Integrations`
3. You need to delete your personal connection first by clicking on it in the section `Personal connectio` then click on `Delete configuration`

   <figure><img src="/files/PMp4z3OWTzEKudikOGOG" alt=""><figcaption></figcaption></figure>
4. Go back to the page of Git connections and click on `Access GitHub`
5. You'll be redirected to the GitHub website, where you can delete the integration with Brainboard.<br>

   <figure><img src="/files/IJn5QNTB7t2tPIniFBBb" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The update will be immediate, and you will no longer be able to do pull requests.
{% endhint %}
