OAuth for Github allows users to clone projects using SSH addresses (git@) and push to repositories.

Procedure

To enable automatic SSH key upload to GitHub for users:

  1. On github.com, click your user icon (top right).

  2. Go to Settings > Developer settings > OAuth Apps.

  3. Click the Register a new application button.

  4. In the Application name field, enter, for example, Eclipse Che.

  5. In the Homepage URL field, enter http://$\{CHE_HOST}:$\{CHE_PORT}.

  6. In the Authorization callback URL field, enter http://$\{CHE_HOST}:$\{CHE_PORT}/api/oauth/callback.

    github oauth
  7. On OpenShift or Kubernetes, update the deployment configuration (see OpenShift configuration).

    CHE_OAUTH_GITHUB_CLIENTID=<your-github-client-id>
    CHE_OAUTH_GITHUB_CLIENTSECRET=<your-github-secret>
  • Substitute all occurrences of ${CHE_HOST} and ${CHE_PORT} with the URL and port of your 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.