Configure Bitbucket Server Integration

Note: This guide is for SwaggerHub On-Premise 1.21.0 and later. If you are using an earlier version, see here.

SwaggerHub On-Premise1.21.0 and later can integrate with multiple self-hosted Bitbucket Servers. You can specify the primary server in the Admin Center. It will be used as the default server for newly created Bitbucket Server Sync integrations.

Specify the default Bitbucket Server

  1. Open the Admin Center.

  2. Select Settings > Integrations on the left.

  3. In the Bitbucket API URL field, enter the URL of your self-hosted Bitbucket Server. If you are using multiple Bitbucket Servers, specify the primary one. Examples:

    https://bitbucket.MyCompany.com
    http://10.100.10.51:7990

    Note

    Make sure to include https:// or http:// at the beginning, but do not add / at the end.

  4. Click Save Changes and Restart. Wait a few minutes for the system to restart completely.

The specified server will be used by default for newly created Bitbucket Server Sync integrations. Note that the users can change the target server in the integration settings.

Trust self-signed SSL certificates

If your Bitbucket Server uses a self-signed SSL certificate or a certificate issued by a private CA, you need to configure SwaggerHub On-Premise to trust your SSL certificates:

  1. Get the CA root and any intermediate certificates of your Bitbucket Server in the PEM format. You can use separate PEM files or a single "CA bundle" PEM file containing all the certificates where each one certifies the one before it. That is, lower-level certificates first, the root certificate last.

    -----BEGIN CERTIFICATE-----
    intermediate certificate 1
    -----END CERTIFICATE-----
    -----BEGIN CERTIFICATE-----
    intermediate certificate 2
    -----END CERTIFICATE-----
    -----BEGIN CERTIFICATE-----
    CA root certificate
    -----END CERTIFICATE-----

    Important

    There must be no blank lines either at the beginning or the end of the file, or between the -----BEGIN CERTIFICATE----- and -----END CERTIFICATE----- lines.

  2. Open the Admin Center.

  3. Select Certificate Manager on the left.

  4. Upload the CA root and intermediate certificates to the Certificate Manager.

  5. Select Settings > Privacy on the left.

  6. Add the uploaded certificates to the SSL Certificate Trust Chain list.

    Note

    If you do not see the uploaded certificates on the list, refresh the page in the browser.

    Adding custom trusted SSL certificates
  7. If you are using SwaggerHub On-Premise 1.19.2 or later, click Save Changes and Restart.

    In earlier versions, click Save Changes, then switch to the System page and click Restart SwaggerHub.

See Also

Publication date: