Connecting Git
Support avatar
Written by Support
Updated over a week ago

(!) Available in the Pro and Enterprise plans

If you prefer to skip Git for now, you can move on to Exploring Your Configuration Data.

Git is a version control system, designed to track source code changes and allow developers collaboration. It introduces the following benefits:

  • Always-relevant documentation - using Git as your team's main source of documentation, easily accessing the context of any feature or change, making future changes less risky.

  • Peer review - popular Git providers come with features for peer review, giving you the opportunity to read through changes, identify bugs, and build shared standards as a team.

  • Debugging and reverting - Git helps you to quickly identify a change that introduced a certain bug and to easily address the bug, either by releasing an updated version of your configuration or by reverting to an older bug-free version.

📘 Git providers:

  • Salto is integrated with all of the Git providers, cloud and on-premises versions. Including, but not limited to: GitHub, GitLab, Bitbucket and Azure DevOps.

  • Please note Git on-premises are supported only in the Enterprise plan.

Follow the below instructions to connect your Git provider to Salto.

To set up your Git provider, first make sure that you have access to a Git repository (this is where your source code changes are tracked and stored), with write permissions (aka not ‘push protected’) to an empty branch. You may need to contact your IT department in order to make this happen.

Then open the left pane and click on your username at the bottom -> Settings -> Git Settings. The Git Settings modal has 5 tabs for GitHub, GitLab, Bitbucket, Azure DevOps and 'Other' for on-premise and other Git providers. Select your desired tab and continue per the below instructions.

Connecting Salto with your Git provider allows Salto to interact with your Git provider and your organization's repositories on your behalf. This allows Salto to pull and push configuration file changes to your git repositories. Your Git provider username will be the author of those changes.

GitHub

For a 'cloud' connection, click ‘Authorize’. Approve the request to authorize Salto, then you will be redirected back to where you clicked on 'Authorize' in the Salto application (the GitHub tab). You should see now your GitHub username under the ‘Authorized Account’ title.

At this point you most likely cannot yet see your repos in Salto. Salto's GitHub app must be installed on your GitHub organization for Salto to have access (this is in addition to your authorizing Salto's app to act on your behalf earlier).
To do so, from the Salto app, click on your username on the bottom left of the UI -> Settings -> Git Settings -> GitHub tab:

  • Click ‘Resolve on Github’. You should land on a GitHub installation page

  • Click on the name of your organization. You should see now specific details for installing Salto's app on your GitHub organization:

    • All repositories is the recommended choice of visibility, so that you can easily use new repositories in Salto without having to deal with settings ever again

    • If you see a button labeled ‘Install’, clicking it will complete the installation and redirect you back to Salto

    • If the button is labeled ‘Request’, your GitHub organization admin should receive a request notification from GitHub to approve your installation request, since your user has insufficient privileges. We recommend talking directly with your GitHub admin, as GitHub notifications are easy to miss.

Once your installation was approved and completed successfully you should be able to see your repositories with the Salto app.

For an 'on-prem' connection, please see the 'other' section below.

Bitbucket & Azure DevOps

For a 'cloud' connection, click ‘Authorize’. This will take you to your Git provider where you will be asked to Authorize SaltoLabs. Approve the request. Then you will be redirected back to Salto. The relevant Git Settings tab should now show your Git provider’s username under the ‘Authorized Account’ title.

You should be able to see now your repositories in the Salto app.

For an 'on-prem' connections, please see the 'other' section below.

GitLab

Select 'on-prem' or 'cloud' per your GitLab service type.

For 'cloud', click ‘Authorize’. Approve the request to authorize Salto, then you will be redirected back to where you clicked on 'Authorize' in the Salto application (the GitLab tab). You should see now your GitLab username under the ‘Authorized Account’ title.

For 'on-prem':
​(!) Salto officially supports GitLab versions 14.X and above

  • Follow the Firewall configuration section below to make sure Salto can access your Git repos.

  • Then, add the following inputs:

    • URL: add the HTTPS URL of your Git on-prem. Make sure to add only the main URL, excluding the project name, which is the URL ending segment.

    • Personal access token: make sure to create a token with API scope permission, see more details here. Salto needs this permission to access your repository.

You should be able to see now your repositories in the Salto app.

Note: If you need to remove the connection to Gitlab in order to connect to a new instance, you can remove the connection from your user settings in Gitlab. Navigate to Applications, locate the "Salto Labs" application and revoke it. The connection will be removed and you can connect to the new Gitlab instance.

Other

Note:
When integrating git with Salto via the 'other' tab, Salto will not support attaching pull requests with deployments records

If you are on the 'Other' tab, you will see a URL field where you should add the HTTPS URL of your Git on-premise (available in the Enterprise plan) or Git cloud provider. Then add your authentication details, commit email address and add your provider.

  • When copying the URL from your Git service to Salto's Git settings, be sure to only copy the main URL, excluding the project name, which is the URL ending segment. The project name should be pasted when configuring Git with a Salto workspace.

  • If you are using a Git on-premise, follow the Firewall configuration section below to make sure Salto can access your Git repos.

1453
1453

đŸ”„ Firewall configuration for Git on-premise providers

In order to allow Salto to access your on-premise Git, please follow the instructions in this page

👍 You've connected your Git Provider to Salto

Now Salto can interact with your Git provider and your organization's repositories on your behalf. This is how you allow Salto to pull and push configuration files to your git repositories on your behalf, i.e. so your Git provider user will be the author of those changes.

Did this answer your question?