LGTM Enterprise 1.19.2

Adding Git or Subversion as a repository provider

Repository providers enable LGTM Enterprise to connect to a repository system and collect data. You manage repository providers from the Integrations administration page.

There are two types of repository provider:

  • Simple repository providers (the subject of this help topic)—are Subversion or Git servers maintained by your organization.

  • External repository providers (see Adding external repository providers)—are services that are external to LGTM Enterprise, which host Git or Team Foundation Version Control (TFVC) repositories—for example, GitHub.com, Azure DevOps, or a GitLab Enterprise instance.

For information about aspects of LGTM's integration with the simple repository providers, see Integration with Subversion or simple Git.

This topic assumes that the machines in the work pool are correctly configured. For more information, see Worker host configuration.

Defining a simple Git or Subversion repository provider

  1. On the Integrations page, click Add new repository provider to display the Add new repository provider page.

  2. Select either Git or Subversion from the drop-down list.

  3. Click Continue to display the definition page.

  4. The Key value is a unique, alphabetic identifier. You can change this if you want to.

  5. Change the default Display name, if required. This is the name of the repository host that is displayed in the user interface.

  6. Define a Short name. This is used in the URLs for LGTM projects created to analyze repositories hosted by this repository provider. For example, 'svn' in https://subversion.example.com/projects/svn/repo-alias/jquery/.

  7. For Subversion only: Enter the credentials that LGTM workers should use to access Subversion repositories in the Username and Password fields.
  8. For Git, the credentials used to access the repository are managed on the LGTM worker hosts directly.

  9. Add one root URL and alias for each repository root you want to analyze. Click Add new to add a new row and define:

    • URL—root URL for the repository

      If you are not sure of the repository root URL you can find it out from the command line as follows:

      For Git: Change to a directory within the repository and enter: git rev-parse --show-toplevel

      For Subversion: Use the command svn info <URL-of-a-resource-within-the-repo>. For example: svn info https://subversion.example.com/repos/path/to/subdirectory/within/repository/

    • Alias—to use in LGTM project names

      Choose a single word that will identify the repository that projects are stored in.

      Aliases can contain the following ASCII characters: uppercase and lowercase letters, decimal digits, periods, hyphens, and underscores.

  10. Select an Authorization provider to define the authorization level for projects created using this repository provider, either:

  11. If you do not want standard users to be able to add projects to LGTM Enterprise, clear the check box labeled Allow non-admin users to add projects.

  12. Click Add to save the new repository provider.

You can add projects to LGTM using this repository provider from the Add projects administration page. When a new project is created, the project name is generated by replacing the root URL with the alias.


This example uses Subversion, but the principles apply equally to Git.

Let's suppose you define a Subversion repository provider as follows:

  • Key: SVN
  • Display name: Subversion
  • Short name: svn
  • Root URL: http://svn-server2.example.com/svn/root
  • Alias: svn-server2

When you add a project from this repository provider, the name of the project in the administration interface is constructed as follows:

<repo provider short name>/<alias of repo root URL>/<remainder of project URL>

So, if you add a project with the URL:


the name of this project in the administration interface will be:


In the main interface—where users have no visibility of the defined repository providers—the repository provider short name is not included in the project name. So the name of this project is:


Project URLs in LGTM Enterprise

The URL for the Overview tab for a project in the main LGTM Enterprise interface comprises:

<domain of your LGTM instance>/projects/<repo provider short name>/<alias of repo root URL>/<URL encoded remainder of project URL>

So our example project might be available at:


Related topicsRelated topics