Last updated

Source control providers

If you are on an Enterprise plan, you can connect your source control to offer continuous validation and delivery of your APIs, reference docs, and developer portals.

From the Source control providers page, you can configure settings for:

  • You will need an Enterprise-level Redocly plan to connect to GitHub Enterprise, Azure or Bitbucket self-managed.
  • You will need a Pro Redocly plan to use GitLab self-managed.

GitHub Enterprise

  1. Using Workflows, navigate to Settings > Source control providers.

  2. On the Source control providers page, under GitHub Enterprise, complete the details to connect to your GitHub Enterprise account.

  3. Select Save Github Enterprise Settings to save your changes and connect your account.

Once you have connected your account, it works similar to the GitHub integration source.

Azure

You will need the Professional or Enterprise plan to connect to Azure Repos connection.

Connect Azure Repos to Redocly

Redocly integrates by using a personal access token to authenticate to Azure Repos.

We recommend using a service user account. A service user is a user created in Azure Repos intended for use by a machine. You would log in to the service user account to generate a personal access token for use by a 3rd party service (like Redocly). We recommend naming your service user "Redocly" or similar.

  1. Log into your Azure Repos account, and under User Settings, create a personal access token. For more information, read the Azure docs to learn how to create a personal access token. Azure DevOps has a current and preview features environment which have different locations for finding where to generate your personal access token.

  2. Set permissions for the personal access token.

  • Select custom defined scopes.

    You must define the scopes correctly.

  • Set read & write code access.
  • Set Web/Service hooks permissions. azure pat scopes

If you set an expiration on the personal access token, set yourself a reminder to generate a new token.

  1. In Redocly, navigate to Settings > Source control providers page.

  2. Scroll down to the Azure section of the page, and complete the details.

    • Enter the Organization name as it appears in your Azure account.
    • Enter your personal access token you created in Azure Repos.
    • Select Save Azure Settings to save your changes. Org Settings Azure

You've now connected Azure Repos to Redocly.

Update access token

To update your token:

  1. On the Source control provider page, under Azure, select Change.

  2. Add in your new token, and select Update Azure Settings.

    Org Settings Azure Settings

Disconnect Azure

To disconnect the integration between Azure Repos and Redocly, on the Source control provider page, under Azure, select Disconnect Azure.

Self-managed GitLab

Connect GitLab self-managed to Redocly

GitLab self-managed operates similarly to the GitLab.com integration, though it requires some additional setup.

Create a GitLab application

  1. Navigate to your GitLab user settings and create a GitLab Application.

    A regular user account is acceptable, but we recommend you create a service account for managing applications. Service accounts typically have administrative privileges, and are not used by human users, but by the system for administration and interacting with external services.

    GitLab user dropdown

  2. Go to the Applications tab and:

    • Enter "Redocly Workflows" for the new application name.
    • Set the Redirect URI to https://app.redocly.com/callbacks/gitlab-auth.
    • Activate the api scope from the Scopes list in order to allow Redocly to read your repositories and write commit statuses. GitLab Applications tab 1
  3. Select Save application to create a new application.

    GitLab Applications tab 2

    You will be redirected to the page with credentials for the new application.

    GitLab application credentials

  4. Keep this tab open as this data is required for the following steps.

Connect application to your organization in Redocly's web app

  1. Using Workflows, navigate to Settings > Source control providers page.

  2. Scroll down to GitLab self-managed section and copy/paste Application ID and Secret values from the GitLab application to the corresponding form fields. Also provide the URL to your self-managed instance. Organization source control gitlab self-managed settings

  3. Select Save self-managed Gitlab settings to complete the configuration.

  4. Finish the authorization flow in a separate tab in your GitLab self-managed instance. Authorize GitLab app

You're all set! You can now use the GitLab self-managed source similarly to the GitLab.com integration source.

Self-managed Bitbucket

You can use Bitbucket Server or Bitbucket Data center as a source for your API versions, reference docs and developer portal projects.

Connect your Bitbucket self-managed account to Redocly

  1. Navigate to Settings > Source control providers.

  2. Scroll down to the Bitbucket self-managed section and:

    • Enter the Username and Password of your Bitbucket user account into the corresponding fields.
    • Provide the URL of your self-managed Bitbucket instance. The URL must start with the protocol (either http or https). Organization source control bitbucket self-managed settings
    Bitbucket service accounts

    A regular user account is acceptable, but we recommend you create a service account on Bitbucket with access to desired repositories. Service accounts typically have administrative privileges, and are not used by human users, but by the system for administration and interacting with external services.

  3. Select Save self-managed Bitbucket settings to complete the configuration.