LGTM Enterprise 1.22.2

Adding external repository providers

Repository providers enable LGTM Enterprise to connect to a repository system and collect data. There are two types of repository provider:

  • External repository providers (the subject of this help topic)—are services that are external to LGTM Enterprise, which host Git or Team Foundation Version Control (TFVC) repositories—for example, GitHub.com, Azure DevOps Services (previously called VSTS), or a GitLab Enterprise instance.

  • Simple repository providers (see Adding Git or Subversion as a repository provider)—are Subversion or Git servers maintained by your organization.

Defining an external repository provider

Before you can add a repository provider for an external system, you must first create an authentication provider for that system. If you want to use integrated authorization, you also need to create an authorization provider for that system. After you have done this:

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

  2. Select the type of external system you want to add 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. Enter a Short name. This is used in the URLs for LGTM projects associated with this repository provider. For example, 'g' in https://lgtm.com/projects/g/jquery/jquery/.

  7. For repository providers where it's displayed: leave the Checkout method unchanged.

    The default Checkout method is, in almost all cases, the correct setting for the repository provider. Only change this setting if you're sure that the worker daemons need to use another protocol to check out code. If you change the method to SSH, you must configure all worker host machines in the work pool to allow connections to the repository host provider over SSH. For more information, see Authenticating with repositories.

  8. For Bitbucket Server, GitHub Enterprise, GitLab Enterprise, and TFS (Git and TFVC):

    Enter the URL for the home page of the repository management system.

  9. Enter the user name and credentials for an account in the repository management system. Credentials are supplied either as a personal access token, an API key, or a password, according to what's supported by the external system. LGTM Enterprise uses this account to access the API for the external system. For more information about this account and the access it requires, see About repository access.

    For TFVC repositories, the password must not contain any of the following special characters:

    < > " '
  10. Select the Authentication provider you created for this external system.

  11. Select an Authorization provider to define the authorization for LGTM projects created using this repository provider:

    • Public—all users can view all the information for projects created using this repository provider.

      For public projects, the full authorization level is used by default.

    • Private—all users can view limited information for the projects created using this repository provider.

      For private projects, the restricted authorization level is used by default.

    • External authorization provider—the project is treated as: public for users with access to the underlying repository, and private for users with no access. This uses authorization information from the external system—for example, Bitbucket Server or GitHub Enterprise. For more information, see Adding authorization providers

    There's no specific TFS authorization provider. If you're defining a TFS repository provider, choose Public as the authorization provider. All LGTM Enterprise users will have the full access to all projects in your TFS instance.

  12. If you do not want standard users to be able to add projects to LGTM Enterprise, clear the check box labeled Allow adding projects through the frontend.

    If this provider is for Azure DevOps Services (previously called VSTS), Bitbucket Cloud, GitHub.com, or GitLab.com, you should always disable this option, unless you are confident that untrusted users never have access to the system.

  13. Click Add to save the new repository provider.

If you're logged in to LGTM with an account that has access to projects hosted by this repository provider, you can now add projects using the Add tab of the Projects page. Unless you have disabled this feature, standard users can also add projects hosted by this external system by going to their My projects page, entering a project URL and clicking Add. For information about linking external accounts to your LGTM account, see Managing external accounts in the user help.

Related topicsRelated topics