Skip to main content

Git integration authentication with SSH keys in Katalon Studio

In Katalon Studio, you can generate and add SSH keys to SSH agents without coding. With SSH keys, you can clone your project from cloud-hosted services of Git and integrate them with Katalon Studio. Cloud-based Git services include:

  • GitHub
  • GitLab
  • BitBucket
  • Microsoft Azure DevOps
Katalon Studio supports Git integration for the following SSH keys:
  • RSA SHA-1, RSA-1024 and RSA-2048
  • RSA SHA-2, ECDSA and Ed25519 (available from version 9.0.0)

This tutorial shows you how to generate SSH keys and clone a repository from cloud-hosted services of Git with an SSH protocol.

Requirements

  • An active Katalon Studio Enterprise license.
  • An existing cloud-based Git repository for your projects. You can download or clone our CI sample project from our GitHub repository: CI sample.
  • An existing account for your Git repository of choice.

Generate SSH keys

To generate new SSH keys, do as follows:
  1. Go to Katalon Studio > Preferences and select General. Click on Network Connections > SSH2.
    SSH URL
    1. General tab: you can manage your SSH home directory and which private key you are using. The SSH is usually located at :/Users/your_user_name/.ssh or C:\Users\your_user_name\.ssh. The .ssh folder contains your SSH private and public keys, for example: id_rsa or id_rsa.pub.
    2. Private keys: you can view or delete the old keys and only keep the ID key you use. To use RSA SHA-2, ECDSA and Ed25519 keys, click Add Private Key and load the key you want to use.
  2. Switch to Key Management tab.
    The dialog appears as below.

    Key management tab

    • Select Generate DSA Key or Generate RSA Key to generate a new SSH key.
    • Select Load Existing Key to check if you already have an existing SSH key. This action opens your .ssh folder.

      load existing key

    • You can also generate an RSA key with this command:

      ssh-keygen -m PEM -t rsa -b 2048 -C "your_email@example.com"

      Note:
      • Katalon Studio only supports OpenSSL, not OpenSSH formats.
      • You cannot load RSA SHA-2, ECDSA, and Ed25519 host keys in the Key Management tab.
  3. Enter the Passphrase or leave it empty, then click Save Private Keys.
    Enter the file name and click Save.

    Save .ssh file

You've successfully generated a pair of public and private keys.

Add a new SSH key to your Git account

In GitHub

  • Go to your Git Account > Settings > SSH and GPG keys and click New SSH key. The SSH keys / Add new page appears.
  • Enter the Title and paste your Key, then click Add SSH key.

    add new SSH key

In Bitbucket

  • Go to Your profile and settings > Personal settings > SSH keys and click Add key. The Add SSH key dialog appears.
  • Enter the Label and paste your Key, then click Add key.

    Bitbucket

In Azure DevOps

  • Go to User Settings > SSH Publics key and click New Key. The Add New SSH Key dialog appears.
  • Enter the Name and paste your Public Key Data, then click Add.

    ADO

In GitLab

  • Go to User Settings > SSH key.
  • Enter the Title, set the expiration date and paste your Key. Then, click Add key.

    GitLab

Clone your project with SSH protocol

You need to enable Git integration. See: Enable Git integration.

To get a SSH protocol: go to your account on GitHub, GitLab, Bitbucket, or Azure DevOps, then go to the repository you want to clone to Katalon Studio. Click Clone and select SSH, then copy the SSH protocol.

After enabling Git Integration, you can clone an existing Git repository into a new directory on the local machine.

Do as follows:

  1. In the main toolbar, click on the Git icon and select Clone Project.
    Clone project
  2. The Clone Git Repository dialog displays.
    Enter a repository URL with SSH Protocol and click Next.

    Clone Git repo dialog

  3. Enter the passphrase, if any, then click OK.
    The Branch Selection dialog appears.

    Branch selection dialog

  4. Specify the local location for cloning as well as the initial branch.
    Local destination
    • Directory: the local storage location you want to store your Git repository.
    • Initial branch: all selected branches from the previous step are displayed here. Select the branch to be used initially from this list.
  5. Click Finish when you are done. Katalon Studio automatically opens your cloned project.
    To verify settings, go to Katalon Studio > Preferences and select Team. Click on Git > Configurations, and select Repository Settings. Ensure that the repository is selected correctly with the URL specified.

    Git setting dialog

You've successfully cloned your repositories. You can commit, pull, and push changes to the repositories from Katalon Studio.
Was this page helpful?