# On-Premises GitHub

### Prerequisites

* The server's IP address, where the agent will be running, must be whitelisted in Github Cloud/Server.

## Follow these steps to seamlessly integrate with GitHub:

## **Step 1. Generate an API Token**

1. Navigate to **Settings > Developer settings** in Github.

   <figure><img src="https://4171758421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS4rgvJ71tpXan8RhYTT4%2Fuploads%2F9wZnR97uBlVGgFGzmUpX%2Fon-premises-github-goto-settings.png?alt=media&#x26;token=e6d910db-bb97-47b2-8787-bf26ffe714fd" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://4171758421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS4rgvJ71tpXan8RhYTT4%2Fuploads%2FvWvYI9elR9dCxUlJomZG%2Fon-premises-github-goto-developer-settings.png?alt=media&#x26;token=52d21513-cff2-4b9a-8140-5ce7131b1ae8" alt=""><figcaption><p><br></p></figcaption></figure>
2. Navigate to **Tokens(classic)** in **Personal access tokens**.&#x20;
3. Then Click on **Generate new token(classic)** in **Generate new token** dropdown.<br>

   <figure><img src="https://4171758421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS4rgvJ71tpXan8RhYTT4%2Fuploads%2FCi3X51W38sWUMOuEILbH%2Fon-premises-github-click-generate-classic-token.png?alt=media&#x26;token=429f09b8-04b8-4835-a68a-73a82bffeaed" alt=""><figcaption><p><br></p></figcaption></figure>
4. Provide a name for the token, such as `dd-token`. Set the expiration to **No expiration**.\
   **Note:** If the token expires, you'll have to perform the integration once again!!\
   &#x20;

   <figure><img src="https://4171758421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS4rgvJ71tpXan8RhYTT4%2Fuploads%2FC4lBNLvEpz9rwoKTU12D%2Fon-premises-github-enter-name-no-expiry.png?alt=media&#x26;token=3c9fcb0c-3ece-40b3-9218-2c5c3da9dee3" alt=""><figcaption><p><br></p></figcaption></figure>
5. Check the following scopes:\
   `repo`, `read:package`, `read:org`, `read:repo_hook`, `user`, `read:discussion`, `read:project`.<br>

   <figure><img src="https://4171758421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS4rgvJ71tpXan8RhYTT4%2Fuploads%2FNX3eSSyWWe5USkPHGrvU%2Fon-premises-github-check-permissions.png?alt=media&#x26;token=c707b584-81a3-404a-9306-8577756665e6" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://4171758421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS4rgvJ71tpXan8RhYTT4%2Fuploads%2FPzsN66mRhD05pNPdFGQl%2Fon-premises-github-click-generate-token.png?alt=media&#x26;token=22098d34-a0c6-4152-bed6-5c1dfb8ebe7f" alt=""><figcaption><p><br></p></figcaption></figure>
6. Click on **Generate token**.
7. Copy the generated token.

## **Step 2. Install On-Premises Agent**

* You can refer [On-Premises Agent Installation](https://docs.devdynamics.ai/installations/on-premises-agent-installation-guide) Guide to successfully setup agent.

With these steps completed, the integration with on-premises Github is successfully done!!
