# Switch GitHub Authentication Method

You can switch from Personal Access Token (PAT) to GitHub App authentication for an existing GitHub instance.

## Before You Begin

- The authentication switch toggle is only available when all repository groups belong to the same organization. GitHub Apps are scoped to a single organization.

- Have the required GitHub App credentials ready: Client ID, Client Secret, and Private Key (.pem file). See Create a GitHub App.

## Switch Authentication Method

1. From the Command Center navigation pane, go to Protect > DevOps.

2. On the Overview page, click the DevOps tab.

3. Click the GitHub app that you want to modify.

4. In the upper-right corner, click Edit app.

   The Edit app dialog box appears.

5. Enable the Switch to app based authentication toggle to switch from Personal Access Token to GitHub App authentication.

6. Provide the required GitHub App credentials:

   1. From the Credential list, select existing GitHub App credentials or create new credentials.

   2. To add new credentials, click the plus button (+), and then specify the following in the Add Credential dialog box:

      a. From the Authentication Type list, select GitHub App.

      b. In the Credential name box, enter the name of the credential.

      c. In the Client ID box, paste the Client ID from GitHub.

      d. In the Client secret box, paste the Client Secret from GitHub.

      e. In the Private key box, click Upload and select the `.pem` file you downloaded, or paste the contents of the `.pem` file.

      f. In Description, enter a description of the credentials.

      g. Click Save.

7. Review your changes, and then click Save to apply the new authentication method.

×

Loading...