Configure Bitbucket Integration (SwaggerHub On-Premise 1.20.x and earlier)

Note: This guide is for SwaggerHub On-Premise versions up to 1.20.x. If you are using a later version, see here.

Before you can use the Bitbucket integration in SwaggerHub On-Premise, you need to specify the target Bitbucket server in the Admin Center. SwaggerHub On-Premise supports Bitbucket.org and Bitbucket Server (formerly Stash). All instances of the Bitbucket integration will work with the specified server.

Note: To integrate with several Bitbucket servers, upgrade to SwaggerHub On-Premise 1.21.0 or later.

Bitbucket.org

SwaggerHub On-Premise is pre-configured for use with Bitbucket.org, so you can start using the Bitbucket integration right away.

Bitbucket Server

To point SwaggerHub On-Premise to your self-hosted Bitbucket Server:

  1. Open the Admin Center.

  2. Select Settings on the left.

  3. In the Integrations section, specify the following settings:

    • Bitbucket API URL – The URL of your Bitbucket Server, for example, https://bitbucket.MyCompany.com or http://10.100.10.51:7990.

      Note

      Do not add / at the end of the URL.

    • Skip git SSL verification – Select this check box if your Bitbucket Server uses a self-signed SSL certificate.

  4. Click Save Changes and Restart.

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

  5. Wait a few minutes for the system to restart completely.

Bitbucket integration will now work with the specified Bitbucket Server.

Trust self-signed 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: