--- id: tj-config title: Configure GitSync in ToolJet --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';
Available on: Paid plans
To configure GitSync with ToolJet, we need the SSH URL from the Git Repo Manager and must authenticate the SSH key with the Repo Manager, which is generated by ToolJet. ## Setting up GitSync in ToolJet Role Required: **Admin** ### 1. Get SSH URL from Git Repo Manager Follow the **[SSH Configuration](/docs/release-management/gitsync/ssh-config#generating-ssh-url)** guide to generate the SSH URL from the Git Repo Manager. ### 2. Configure the GitSync Feature on ToolJet 1. Go to the **Workspace settings**, and click on the **Configure git** tab. GitLab Repo 2. Enter the **SSH URL** of the repository in the **Git repo URL** field. 3. Click on the **Generate SSH key** button, and copy the SSH key that is generated. The SSH key is used to authenticate ToolJet with the repository. GitSync There are two types of generated SSH keys: - **ED25519**: This is a secure and efficient algorithm that is used for generating SSH keys. It is recommended to use this key type. VCS providers like GitHub and GitLab recommend using this key type - **RSA**: This is an older algorithm that is used for generating SSH keys. It is not recommended to use this key type. Older VCS providers like Bitbucket recommend using this key type. GitSync ### 3. Deploy the SSH Key Once the SSH key is generated, follow the **[SSH Configuration](/docs/release-management/gitsync/ssh-config#deploy-the-ssh-key)** guide to deploy the SSH key using the Git Repo Manager. ### 4. Finish the GitSync Configuration on ToolJet After deploying the SSH Key, go to the **Configure git** tab on ToolJet, and click on the **Finalize setup** button. If the SSH key is configured correctly, you will see a success message. GitSync ## Configuring GitSync on a Different Branch Starting from version **v3.5.3-ee-lts**, GitSync in ToolJet supports custom branches. This feature is available only in the Self-Hosted version of ToolJet. The custom branch for GitSync is configured at the instance level via an environment variable. Different repositories can be configured for different workspaces, but the custom branch set in the **.env** file must be present in all configured repositories to ensure smooth operation. The branch specified in the **.env** file will apply to all workspaces with GitSync support. To configure a custom branch for GitSync, you need to set the following environment variable in your **.env** file:
`GITSYNC_TARGET_BRANCH` = **branch-name** **Note:** **Existing GitSync users** who want to use a custom Git branch must first create a new custom branch from the master branch in the Git repository manager. Then, they must configure the branch name in the **.env** file to ensure all operations work smoothly.