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
-
Git is installed. Install Git if needed by following Getting Started - Installing Git
To clone a repository using HTTPS:
-
Use the clone command provided by the
vscodeGit extension.
Alternatively, use the native Git commands in the terminal to clone a project.
-
Navigate to destination folder using
cdcommand -
Use
git cloneto clone a repository$ git clone <link>
Accessing a Git repository via SSH
-
Personal GitHub account created.
-
SSH key pair generated.
Generating an SSH key
To generate an SSH key pair:
-
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.
-
After the key is generated, click the View button and copy the public key from the editor.
-
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:
-
Navigate to github.com.
-
Click the drop-down arrow next to the user icon in the top-right corner of the window.
-
Click Settings → SSH and GPG keys and then click the New SSH key button.
-
In the Title field, type a title for the key, and in the Key field, paste the public key copied from Che.
-
Click the Add SSH key button.
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:
-
Navigate to gitlab.com.
-
Click the user icon in the top-right corner of the window.
-
Click Settings → SSH Keys.
-
In the Title field, type a title for the key and in the Key field, paste the public key copied from Che.
-
Click the Add key button.
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
-
Authenticate by running the GitHub Pull Requests: Manually Provide Authentication Response command and paste the GitHub token.
-
Select the repository permissions when generating the token.
Creating a new pull request
-
Open the GitHub repository. To be able to execute remote operations, the repository must have a remote with an SSH URL.
-
Checkout a new branch and make changes that you want to publish.
-
Run the GitHub Pull Requests: Create Pull Request command.
