# Adding GitHub organization to Xopero ONE

## Using OAuth

{% stepper %}
{% step %}
Log in to [**XMS**](#user-content-fn-1)[^1], open the **DevOps** tab on the left side of the window, and select **GitHub** from the list.

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2Ffg1DkCZqeN6MJAeq9e6t%2Fimage.png?alt=media&#x26;token=ed4a850c-81be-4275-834c-1c565791cfab" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Click the **Connect** button under **GitHub**.

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2FHw9gqNHX7jGAg0QF7XdC%2Fimage.png?alt=media&#x26;token=2e402378-6f99-4d66-ad73-298b54968cd8" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
[In the window that pops-up](#additional-browser-permissions), log in with a user account which has the required permissions for the repositories or projects to protect. If your **GitHub** login session is active in a different tab, the login will complete automatically.
{% endstep %}

{% step %}
Grant **Xopero ONE** access to the specified resources (when prompted).
{% endstep %}

{% step %}
Your **GitHub** organization has now been successfully added to **Xopero ONE**. Click **Custom policy** to adjust your backup policy settings, or click **Run backup** to execute the backup immediately using the current policy configuration.

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2F7EuubTtWsl61CD4FMTx9%2Fimage.png?alt=media&#x26;token=b9c2ca9d-c009-4427-a069-56385be99d22" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

***

## Using GitHub App

{% stepper %}
{% step %}
Log in to [**XMS**](#user-content-fn-1)[^1], open the **DevOps** tab on the left side of the window, and select **GitHub** from the list.

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2FKcLpjpXejAan6aGzjf0C%2Fimage.png?alt=media&#x26;token=769c664a-b552-4330-9215-846c1b93ace8" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Click the **advanced mode** link under **GitHub** and **GitHub Enterprise Server** tiles.

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2FDd5VgTHgeWtUpoZXKdGR%2Fimage.png?alt=media&#x26;token=4a6b0219-38bd-47e9-9222-630ebe981938" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Set your authentication method.

1. In **Authentication**, select **GitHub**.
2. For **Connect using**, choose **GitHub App**.
3. Choose whether **Xopero** should automatically add new repositories to your backup.

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2FrZV3AQHqbkFbA0tuMtMy%2Fimage.png?alt=media&#x26;token=444ae580-f030-41dd-b2e3-bdc01a2ad11e" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Configure your repository sync and default worker. Specify hours for synchronization, or set a time interval for automatic updates.

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2Fxao0KkYPmITcz661POOw%2Fimage.png?alt=media&#x26;token=eb8b7bc6-b555-4db7-b22b-4c036a87d414" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Click **Proceed** to complete adding your **GitHub** organization and grant **Xopero ONE** access to the specified resources. [In the window that pops-up](#additional-browser-permissions), log in with a user account which has the required permissions for the repositories or projects to protect. If your **GitHub** login session is active in a different tab, the login will complete automatically.
{% endstep %}

{% step %}
Select repositories you want to protect and click **Install & Authorize** to proceed.

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2FKAizNJnHFefpODQY7DHT%2Fimage.png?alt=media&#x26;token=d79bf262-6696-40c4-a890-5c4ecdf7cd04" alt="" width="400"><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Your **GitHub** organization has now been successfully added to **Xopero ONE**. Click **Custom policy** to adjust your backup policy settings, or click **Run backup** to execute the backup immediately using the current policy configuration.

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2F2ZPRKFQe9GIDhmF1JBFn%2Fimage.png?alt=media&#x26;token=def82f1e-669b-426f-9377-51968f726638" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

***

## Using Personal Access Token (PAT)

{% stepper %}
{% step %}
Log in to [**XMS**](#user-content-fn-1)[^1], open the **DevOps** tab on the left side of the window, and select **GitHub** from the list.

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2Ffg1DkCZqeN6MJAeq9e6t%2Fimage.png?alt=media&#x26;token=ed4a850c-81be-4275-834c-1c565791cfab" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Click the **advanced mode** link under **GitHub** and **GitHub Enterprise Server** tiles.

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2FpIPUO8Dx4BikYeH1M2Vp%2Fimage.png?alt=media&#x26;token=c2f026c9-2a66-4314-8a0d-7a1bc5184fd0" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Set your authentication method.

1. In **Authentication**, select **GitHub**.
2. For **Connect using**, choose **Login and Personal Access Token**.
3. Enter your **username**.
4. Add or select **PAT** from the **Password Manager**.
5. Choose whether **Xopero** should automatically add new repositories to your backup.

{% hint style="warning" %}
If the **PAT** does not exist, you need to add it. The **PAT** should be pasted into the password field.
{% endhint %}

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2FNwZVHfQm3ejuUe33KdH3%2Fimage.png?alt=media&#x26;token=8c4f85e1-04de-46cd-8da5-0feee830ea41" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Configure your repository sync and default worker. Specify hours for synchronization, or set a time interval for automatic updates.

<figure><img src="https://319733277-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0CBTl43C3OO6ySL1DJ6k%2Fuploads%2Fxao0KkYPmITcz661POOw%2Fimage.png?alt=media&#x26;token=eb8b7bc6-b555-4db7-b22b-4c036a87d414" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Click **Proceed** to complete adding your **GitHub** organization and grant **Xopero ONE** access to the specified resources.
{% endstep %}
{% endstepper %}

***

## Additional browser permissions

When adding an organization, you may be prompted to grant additional permissions to the **Xopero ONE** application— make sure your browser allows **Xopero** to open pop-up windows.

<figure><img src="https://content.gitbook.com/content/0CBTl43C3OO6ySL1DJ6k/blobs/92JwIolq3nNcqZWYoX80/1.PNG" alt=""><figcaption></figcaption></figure>

Depending on your browser, you can either adjust the settings to allow pop-ups or permit the authorization window to open once.

<figure><img src="https://content.gitbook.com/content/0CBTl43C3OO6ySL1DJ6k/blobs/yMSRLkEP2cPAsr3MksgJ/Pop-ups%20xone.png" alt="Mozilla pop-up allowance"><figcaption></figcaption></figure>

[^1]: Xopero ONE Management Service
