Configuring GitHub OAuth

OAuth for GitHub allows for automatic SSH key upload to GitHub.

Procedure
  • Set up the GitHub OAuth client. The Authorization callback URL is filled in the next steps.

    1. Go to the Keycloak administration console and select the Identity Providers tab.

    2. Select the GitHub identity provider in the drop-down list.

    3. Paste the Redirect URI to the Authorization callback URL of the GitHub OAuth application.

    4. Fill the Client ID and Client Secret from the GitHub oauth app.

    5. Enable Store Tokens.

    6. Save the changes of the Github Identity provider and click Register application in the GitHub oauth app page.

      github keycloak setup
  • For Che deployed in single-user mode:

    1. On OpenShift or Kubernetes, update the deployment configuration (see Configuring the Che installation and installation-guide:advanced-configuration-options-for-the-che-server-component.adoc#authentication-parameters).

      CHE_OAUTH_GITHUB_CLIENTID=<your-github-client-ID>
      CHE_OAUTH_GITHUB_CLIENTSECRET=<your-github-secret>
    2. In the Authorization callback URL field of the GitHub OAuth application, enter <prod-url/api/oauth/callback.

      • Substitute <prod-url> with the URL and port of the Che installation.

      • Substitute <your-github-client-ID> and <your-github-secret> with your GitHub client ID and secret.

      • This configuration only applies to single-user deployments of Che.