Eclipse Che natively supports the VS Code SCM model. By default, Eclipse Che includes the native VS Code Git extension as a Source Code Management (SCM) provider.

Accessing a Git repository via HTTPS

Prerequisites
Procedure

To clone a repository using HTTPS:

  1. Use the clone command provided by the vscode Git extension.

Alternatively, use the native Git commands in the terminal to clone a project.

  1. Navigate to destination folder using cd command

  2. Use git clone to clone a repository

    $ git clone <link>

Accessing a Git repository via SSH

Prerequisites

Generating an SSH key

To generate an SSH key pair:

  1. Run the SSH: generate key pair command, or, to generate a key that will work only with a particular Git provider, run SSH: generate key pair for particular host.

  2. After the key is generated, click the View button and copy the public key from the editor.

  3. Add the public key to the Git provider.

Adding the associated public key to a repository or account on GitHub

To add the associated public key to a repository or account on GitHub:

  1. Navigate to github.com.

  2. Click the drop-down arrow next to the user icon in the top-right corner of the window.

  3. Click SettingsSSH and GPG keys and then click the New SSH key button.

  4. In the Title field, type a title for the key, and in the Key field, paste the public key copied from Che.

  5. Click the Add SSH key button.

    che theia basics ssh

Adding the associated public key to a Git repository or account on GitLab

To add the associated public key to a Git repository or account on GitLab:

  1. Navigate to gitlab.com.

  2. Click the user icon in the top-right corner of the window.

  3. Click SettingsSSH Keys.

  4. In the Title field, type a title for the key and in the Key field, paste the public key copied from Che.

  5. Click the Add key button.

    che theia basics ssh keys

Managing pull requests using the GitHub PR plug-in

To manage GitHub pull requests, the VS Code GitHub Pull Request plug-in is available in the list of plug-ins of the workspace.

Using the GitHub Pull Requests plug-in

  1. Authenticate by running the GitHub Pull Requests: Manually Provide Authentication Response command and paste the GitHub token.

  2. Select the repository permissions when generating the token.

Creating a new pull request

  1. Open the GitHub repository. To be able to execute remote operations, the repository must have a remote with an SSH URL.

  2. Checkout a new branch and make changes that you want to publish.

  3. Run the GitHub Pull Requests: Create Pull Request command.

Tags: