Git and SVN
SLX.cloud natively supports Git and SVN, which is installed in all pre-defined stacks. Versioning functionality is available in the IDE and in the terminal. When using the Git and SVN menu, commands are injected into the workspace runtime and all output is streamed into the consoles panels.The following sections describe how to connect and authenticate users to a remote git/svn repository.
NOTE: Currently the graphical IDE and terminal git commands access independent settings (e.g. user information are not shared). This is a known limitation and actively worked on.
- Import Project from Repository
- Git Workspace Clients
- Set Git Committer Name and Email
- Git Using SSH Keys
- Examples about Using SSH Keys
Import Project from Repository
1. Using Dashboard
Import project from the IDE
Dashboard > Create Workspace > Add or Import Project.
2. Using SSH in IDE
Import project from the IDE
Workspace > Import Project > GIT/SUBVERSION menu.
Git Workspace Clients
After importing a repository, you can perform the most common Git operations using interactive menus or as terminal commands. Terminal git commands require it’s own authentication setup, which means that keys generated in the IDE will work only when Git is used in the IDE menus. Git installed in a terminal is a different git system. You may generate keys in
~/.ssh there as well.
Set Git Committer Name and Email
Committer name and email are set in
Profile > Preferences > Git > Committer. Once set each commit will include this information.
Git Using SSH Keys
Private repositories will require a secure SSH connection and most developers who plan to push to a repo will clone it via SSH, so an SSH key pair needs to be generated. SSH keys are saved in user preferences, so you need to generate the SSH key only once and it will be used in all workspaces.
When cloning be sure to use the SSH URL like
git@<git url>:<account>/<project>.git when importing a project from a git repository using SSH key authorization. Note: HTTPS git URL can only be used to push changes if you enable oAuth authentication as described in Git Using oAuth.
1. Generate New SSH Keys
SSH keys can be generated at
Profile > Preferences > SSH > VCS. Use the
Generate Key button and manually save the resulting key to your Git hosting provider account. When prompted to provide the hostname for your repo, make sure it is a bare hostname (no www or http/https) as in the example below.
After the key has been generated, you can view and copy it, and save to your repository hosting account.
2. Use Existing SSH Keys
You can upload an existing public key instead of creating a new SSH key. When uploading a key add the hostname (using no www or http/https - as in the example below). Note that the
public key > view button will not be available with this option as the public file should be generated already.
3. Adding SSH Public Key to Repository Account
Each repository provider has their own specific way to upload SSH public keys. This is required to use features such as
push from the Git or Subversion menu in the workspace.
Examples about Using SSH Keys
The following example is specific to GitHub and GitLab but can be used with all git or SVN repository providers that use SSH authentication. Please refer to documentation provided by other providers for additional assistance.
1. GitHub Example
To add the associated public key to a repository/account using github.com click your user icon(top right) then
settings > ssh and gpg keys > new ssh key. Give a title to your liking and paste the public key copied from SLX.cloud into form.
2. GitLab Example
To add the associated public key to a git repository/account using gitlab.com click your user icon(top right) then
Profile Settings > SSH Keys. Give a title to your liking and paste the public key copied from SLX.cloud into form.
3. BitBucket Example
You can setup ssh to a dedicated BitBucket Server. Each user will still need to setup their own SSH key for authentication to the BitBucket Server which will be similar to GitHub/GitLab SSH examples.