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

# GitHub

> GitHub is a software company that offers code hosting services that allow developers to build software for open-source and private projects.

## Creating a GitHub connection

Create the connection by using one of the following methods:

* [OAuth](#using-oauth)
* [Access Token](#using-access-token)
* [GitHub App Installation](#using-github-app-installation)
* [Using SSH](#using-ssh)

### Using OAuth

#### Creating your connection

1. In the Blink platform, navigate to the **Connections** page > **Add connection**. A New Connection dialog box opens displaying icons of external service providers available.
2. Select the **GitHub** icon. A dialog box with name of the connection and connection methods appear.
3. (Optional) Edit the name of the connection. At a later stage you cannot edit the name.
4. Click **GitHub** to authenticate using OAuth.
5. Sign in using your credentials.

### Using Access Token

To create the connection you need:

* An API Address
* A Token

#### Obtaining the credentials

Follow the instructions in the following link: [Creating a personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)

#### Creating your connection

1. In the Blink platform, navigate to the **Connections** page > **Add connection**. A New Connection dialog box opens displaying icons of external service providers available.
2. Select the **GitHub** icon. A dialog box with name of the connection and connection methods appear.
3. (Optional) Edit the name of the connection. At a later stage you cannot edit the name.
4. Select **Access Token** as the method to create the connection.
5. Fill in the parameters:
   * The API Address
   * The Token
6. (Optional) Click **Test Connection** to test it.
7. Click **Create connection**. The new connection appears on the **Connections** page.

### Using GitHub App Installation

To create the connection you need:

* An API Address
* An Application ID
* An Installation ID
* A GitHub App Private Key (PEM)

#### Creating a GitHub App

1. In the upper-right corner of any page on GitHub, click your **profile photo**.
   <img src="https://mintcdn.com/blinkops-2/7FAgv_y_IOg-cLCX/img/Github/profile.png?fit=max&auto=format&n=7FAgv_y_IOg-cLCX&q=85&s=a04c56e953b23126f2f5b9357934c6bb" alt="github create app" width="2561" height="1289" data-path="img/Github/profile.png" />

2. Navigate to **Developer settings**.
   * For a personal account click **Settings**, then in the left sidebar click **Developer settings**.
   * For an organization:
     * Click **Your organizations**.
     * To the right of the organization, click **Settings**.
     * In the left sidebar, click **Developer settings**.
       <img src="https://mintcdn.com/blinkops-2/7FAgv_y_IOg-cLCX/img/Github/developers-settings.png?fit=max&auto=format&n=7FAgv_y_IOg-cLCX&q=85&s=2d1e0a12b4a47213211f3fe06fa995a4" alt="github create app" width="2547" height="1309" data-path="img/Github/developers-settings.png" />

3. Under **Developer settings** select **GitHub Apps**.
   <img src="https://mintcdn.com/blinkops-2/7FAgv_y_IOg-cLCX/img/Github/select-github-app.png?fit=max&auto=format&n=7FAgv_y_IOg-cLCX&q=85&s=0b7c5b722376a14d95bd72a305f6207c" alt="github create app" width="2547" height="1317" data-path="img/Github/select-github-app.png" />

4. Click **New GitHub App**.
   <img src="https://mintcdn.com/blinkops-2/7FAgv_y_IOg-cLCX/img/Github/create-app.png?fit=max&auto=format&n=7FAgv_y_IOg-cLCX&q=85&s=113dcd4533cd47e27991f4f8f957a62b" alt="github create app" width="2549" height="1283" data-path="img/Github/create-app.png" />

5. Enter the required, fields scroll down, and click **Create GitHub App**.
   <img src="https://mintcdn.com/blinkops-2/7FAgv_y_IOg-cLCX/img/Github/create-app-click.png?fit=max&auto=format&n=7FAgv_y_IOg-cLCX&q=85&s=92f55ee0fd0faa1257c25cfa2d1c24cf" alt="github create app" width="2543" height="1282" data-path="img/Github/create-app-click.png" />

6. On the app settings page, scroll to **Private keys**.
   <img src="https://mintcdn.com/blinkops-2/7FAgv_y_IOg-cLCX/img/Github/private_key_scroll.png?fit=max&auto=format&n=7FAgv_y_IOg-cLCX&q=85&s=8bdd12ab888b3458f1c0260148bafffb" alt="github create app" width="2562" height="1320" data-path="img/Github/private_key_scroll.png" />

7. Click **Generate a private key**.
   <img src="https://mintcdn.com/blinkops-2/7FAgv_y_IOg-cLCX/img/Github/private_key.png?fit=max&auto=format&n=7FAgv_y_IOg-cLCX&q=85&s=71472c23dcc931e65538a2934dfb7db9" alt="github create app" width="2548" height="1285" data-path="img/Github/private_key.png" />

8. Download and store the PEM file securely.

9. In the left sidebar, click **Install App**.
   <img src="https://mintcdn.com/blinkops-2/7FAgv_y_IOg-cLCX/img/Github/install-click.png?fit=max&auto=format&n=7FAgv_y_IOg-cLCX&q=85&s=1c0bf5764aa09c51bd0c131bd4cb93ed" alt="github create app" width="2563" height="1316" data-path="img/Github/install-click.png" />

10. Click **Install**.
    <img src="https://mintcdn.com/blinkops-2/7FAgv_y_IOg-cLCX/img/Github/install.png?fit=max&auto=format&n=7FAgv_y_IOg-cLCX&q=85&s=844da1fa848a2ad28e67f2b91dc6205c" alt="github create app" width="2560" height="1280" data-path="img/Github/install.png" />

#### Obtaining the credentials

1. In the upper-right corner of any page on GitHub, click your **profile photo**.
   <img src="https://mintcdn.com/blinkops-2/1cTezLjGjT5SHlFZ/img/Github/1.png?fit=max&auto=format&n=1cTezLjGjT5SHlFZ&q=85&s=847e5784609c7b0863f552cbe28661f7" alt="github main" width="1728" height="1080" data-path="img/Github/1.png" />

2. Navigate to your account settings.
   * For an app owned by a personal account, click **Settings**.
   * For an app owned by an organization:
     * Click **Your organizations**.
     * To the right of the organization, click **Settings**.
       <img src="https://mintcdn.com/blinkops-2/1cTezLjGjT5SHlFZ/img/Github/2.png?fit=max&auto=format&n=1cTezLjGjT5SHlFZ&q=85&s=546f108b7e95712db3b45af1dc5af3a2" alt="github main" width="1728" height="1080" data-path="img/Github/2.png" />

3. In the left sidebar, click **Applications**.
   <img src="https://mintcdn.com/blinkops-2/1cTezLjGjT5SHlFZ/img/Github/3.png?fit=max&auto=format&n=1cTezLjGjT5SHlFZ&q=85&s=0ea912a525801562a61370268e098f8a" alt="github main" width="1728" height="1080" data-path="img/Github/3.png" />

4. Select your application by clicking **Configure**.
   <img src="https://mintcdn.com/blinkops-2/1cTezLjGjT5SHlFZ/img/Github/4.png?fit=max&auto=format&n=1cTezLjGjT5SHlFZ&q=85&s=d503103e9c5ce1c92da17f4c03915a14" alt="github main" width="1728" height="1080" data-path="img/Github/4.png" />

5. You can find your **Installation ID** at the end of the URL path (github.com/settings/installations/**Your Installation ID**).
   <img src="https://mintcdn.com/blinkops-2/1cTezLjGjT5SHlFZ/img/Github/5.png?fit=max&auto=format&n=1cTezLjGjT5SHlFZ&q=85&s=2f9fd934efaae3044362319c850d608c" alt="github main" width="1728" height="1080" data-path="img/Github/5.png" />

6. Click **App settings**.
   <img src="https://mintcdn.com/blinkops-2/1cTezLjGjT5SHlFZ/img/Github/55.png?fit=max&auto=format&n=1cTezLjGjT5SHlFZ&q=85&s=7d3eba16ca3e62662af8f0dd2f7c5857" alt="github main" width="1728" height="1080" data-path="img/Github/55.png" />

7. Next to Client ID, you will see the **client ID** for your app.
   <img src="https://mintcdn.com/blinkops-2/1cTezLjGjT5SHlFZ/img/Github/6.png?fit=max&auto=format&n=1cTezLjGjT5SHlFZ&q=85&s=96c0df85f055e2987db0dec29ad135ea" alt="github main" width="1728" height="1080" data-path="img/Github/6.png" />

8. Scroll down to Private keys to generate your **App Private Key (PEM)**. Make sure to paste your key with the RSA labels.
   <img src="https://mintcdn.com/blinkops-2/1cTezLjGjT5SHlFZ/img/Github/7.png?fit=max&auto=format&n=1cTezLjGjT5SHlFZ&q=85&s=cc9a9045b163c1c2da48d35bd13b39a7" alt="github main" width="1728" height="1080" data-path="img/Github/7.png" />

#### Creating your connection

1. In the Blink platform, navigate to the **Connections** page > **Add connection**. A New Connection dialog box opens displaying icons of external service providers available.
2. Select the **GitHub** icon. A dialog box with name of the connection and connection methods appear.
3. (Optional) Edit the name of the connection. At a later stage you cannot edit the name.
4. Select **GitHub App Installation** as the method to create the connection.
5. Fill in the parameters:
   * The API Address
   * The Application ID
   * The Installation ID
   * The GitHub App Private Key (PEM)
6. (Optional) Click **Test Connection** to test it.
7. Click **Create connection**. The new connection appears on the **Connections** page.

### Using SSH

An SSH connection is supported for the use of core.git

To create the connection you need:

* An existing SSH private and public key pair or generate a new one. To generate a new SSH key pair can use the SSH-keygen command.

#### Obtaining the credentials

You need to upload the public key to GitHub. Do this by following the instructions: [Adding a new SSH key to your GitLab account](https://docs.gitlab.com/ee/ssh/#add-an-ssh-key-to-your-gitlab-account) We do not support SSH key with passphrase for the CLI, therefore generate one without a passphrase.

#### Creating your connection

1. In the Blink platform, navigate to the **Connections** page > **Add connection**. A New Connection dialog box opens displaying icons of external service providers available.

2. Select the **SSH** icon. A dialog box with name of the connection and connection methods appear.

3. (Optional) Edit the name of the connection. At a later stage you cannot edit the name.

4. Select **SSH** as the method to make the connection.

5. Fill in the parameters:

   * The key
   * The passphrase
   * The username

6. (Optional) Click **Test Connection** to test it.

7. Click **Create connection**. The new connection appears on the **Connections** page.

### Interactive Tutorial Guides

You can also refer to the following tutorial guides for a more in-depth understanding of how to create a GitHub connection.

[Creating a GitHub Connection in Blink Ops](https://demo.arcade.software/NnNufeQnrrCVgJdczkiq?embed\&show_copy_link=true)

[Creating a Github Connection](https://demo.arcade.software/O2dnqU9jpekogow60aGv?embed\&show_copy_link=true)
