> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.itential.com/itential-gateway/4/git-integration/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.itential.com/_mcp/server. # Git integration > Configure and use Git integration in Itential Gateway to import scripts from Git repositories. For scripts saved in Git repositories, Itential Gateway has a process to import those scripts from those various repositories. **"Git"** refers to the use of GitHub, GitLab, Bitbucket, and other Git-based code integration/management tools. ## Git in Gateway The primary **Git** tab is located in the left navigation menu of Gateway. Alternatively, it is also listed under the **Configuration** tab. ![](/_fern-img/7496fd1c0d7032e20ee44a3fcbae8fa7af5263f9efe5fa8964bba05a28c12b38.webp) ### Configure Git integration From the **Configuration** tab, you can click **Git** to display the **Git Integration Configuration** modal, with configuration fields for **Git Exec**, **Git Key Path**, and **Git Repo Path**. **Strict Host Key Checking** is an available option that will automatically check for a known host with an SSH key. If this option is checked, further manual action is required. You will need to check the server terminal to select "Yes" if the SSH key is a trusted key. ![](/_fern-img/3a0676decbb1162206440805c63de375a382063c5e61c7dd8af6df3ecc34aa0a.webp) ### Create an SSH key When you click the **Git** tab in the left navigation menu of Gateway, a dropdown list for **SSH Keys**, **Integrations**, and **Repositories** displays. ![](/_fern-img/c16c8489fafcfd399d79cbf3dd1ca8b6c9efc76d281733e688ad87452d0be2a7.webp) #### Open the Create dialog Click the **"+"** in the top toolbar to open the **Create** dialog box. Scroll down and select **Git SSH Keys**. ![](/_fern-img/e1696c389847259e166461906f1a35cbf619d9d6c08076ce1ef45d0f998eaa3c.webp) #### Generate the key Enter a name for the key under **Generate SSH Key**. Then click the **Generate** button. ![](/_fern-img/802769018396052ae20a3f41f71d06b05cddf322923bf5377abdd60b00bd1ae3.webp) #### View the generated key An SSH key will be generated and a message banner displays in the upper right corner to confirm the SSH key pair was successfully generated. Click on **SSH Keys** in the left navigation bar. The newly generated key will display in the **Public Key** box with the name it was given. You will be able to view the SSH key and copy/paste it into Git. ![](/_fern-img/d6fa01af91d006d1c428d91b3e5c17c206894d82be0a18993c152a0f9cb9df93.webp) ### Add an SSH key After creating the key, go to your Git CI/CD platform (e.g., GitLab) and access the appropriate section to set up your **SSH Keys**. #### Paste the generated key In GitLab, click **Add an SSH Key** and paste the generated key into the **Key** box provided. ![](/_fern-img/06921b7a4287da193faacc41c03ba9c2f4da600b2450562dd81bb569fae8ee60.webp) #### Add the key Enter a key **Title** (name). Click **Add Key**. Both Gateway and Git now have the same SSH key. Making the key title the same name as the SSH key created in Gateway will help identify what the key was created for. ![](/_fern-img/a7b72c9801230fb84e230adbeaa698fef506d8af9e6a35fd7f25badb75193872.webp) ### Create a Git integration #### Navigate to Integrations From Gateway, click **Integrations** in the left navigation. A list of any created integrations will also be shown here. #### Create a new integration Click the **"+"** in the top toolbar to open a **Create** dialog box and then select **Git Integration** from the dropdown list. ![](/_fern-img/45cc8880bf05116b5508b865118055b0d4ce111111cb9e6f82b98098a916a57c.webp) #### Name and configure the integration Type in a name for the integration. Then select the name of the SSH key that was created from [above](#add-an-ssh-key). Click **Create**. ![](/_fern-img/df25e749c8f4117775eb41122f661754462692eaa9c404dcb2c7d8583d0eaa21.webp) #### Save changes Click the name of the Git integration in the sidenav menu to display information pertaining to the integration and the SSH key being used. Click the search bar under **SSH Key Name** to display a dropdown list of names of any SSH keys that are stored. This allows you to change the integration to another key that has been created. Click **Save** at the bottom of the page to keep any changes. ![](/_fern-img/41eb1d8755a3a231e1bfee5b25f019383928724165a32ffb58b3e393c46242b9.webp) ### Create a Git repository #### Open the Create dialog Click the **"+"** in the top toolbar to open the **Create** dialog. Scroll down the list and select **Git Repository** and then click **Create**. ![](/_fern-img/cf95eaf74985753e165c36e9874146356df989db93387d150c47ea125b2642aa.webp) #### Configure the repository Select the integration that was [created above](#create-a-git-integration) and enter a name for this repository. Copy the SSH key from Git (i.e., use the Clone button in GitLab) and paste it into the Repository field. Next, choose the necessary code branch (in this case it is called "master"). This will be the location on the server where the repository is stored. In the example below, `/opt/automation-gateway/repos/iag-repo/` is the location where the integration can be found. To clone and download the repository, click **Create**. ![](/_fern-img/c65da67d7e6c7a46f5a194d7ca892a9343c21bd54a33bf9cbb8dfd1a07c5790c.webp) #### View the repository Click on the **Repository** tab in the left navigation menu and the repository name will be displayed. Click on the repository name to view information related to the repository. The **Remote Fingerprint** will display a unique identifier for the **Host Key Check In**. In the example below, multiple **Host Keys** have been added and are shown for the Host Key Check In. ![](/_fern-img/0dc0de8fe527839f29d0ed52e725dafa3bbcce5380e949d3695fa3c9ef611de9.webp) #### Repository controls In the footer (under the **Remote Fingerprint**), there are repository controls where you can **Pull** repo data, **Reset** repo data (if making any changes locally on the server — resetting will go back to the last commit), **Delete** data, or **Reset the Fingerprint** (this will remove the data shown under the Remote Fingerprint). ![](/_fern-img/6597a4435f9f788137b7154995cf6bd215b4988268c961b30e206cc6b4b62d00.webp) ### Import script configurations #### Copy the file path Copy the **File Path** from the repository that was created. For example: `/opt/automation-gateway/repos/iag-repo/`. #### Configure the scripts path Open the **Scripts** tab in the left side navigation. Paste the file path under **Scripts Paths**. Click the **Save** icon at the top. Gateway will now be able to find all of the scripts in that directory. ![](/_fern-img/c4423872d5dee23a62b4576f464af91e9fbc36cd8e03bf9ea7a3d19a7575cdf0.webp) ### Import decorations Importing decoration scripts into the repo is an efficient way to save time without having to make edits to the decorations. #### Navigate to Decorations Go to **Configurations** in the left-hand navigation and click **Scripts**. Under the **Parameters** tab, various decorations will be shown. Select a **Decoration** and click the pencil icon to edit it. The decoration is a script built from a JSON object with `type`, `item`, and `arguments` that will get passed on when the decoration is used. ![](/_fern-img/a07fc87bf784dd85584a94b7160085e9af8242765d0041f788140d8b8173048f.webp) #### Pull from Git When a **Git Pull** is done, the decoration pattern will be found using the file name (example: `C_demo.scripts.iag.json`). The parameters will be imported into Gateway and saved to the database. Anytime there is a Git Pull from the repo, the decorations are saved into the database and can be located by their unique name attached to `scripts.iag.json`. If the script, playbook, or module is not named with this exact suffix (e.g., `name.type.iag.json`), it will not be imported on a Git Pull. ![](/_fern-img/93b96e171085c634207e96ab221414e78bcfb281d01b09a20f78c4e1854bfd7f.webp) Collection modules are not supported and cannot be decorated automatically for a Git Pull. > Configure and use Git integration in Itential Gateway to import scripts from Git repositories.