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
Open the Admin Center.
Select Settings > Integrations on the left.
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:
Note: Make sure to include https:// or http:// at the beginning, but do not add
/at the end.
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:
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-----
There must be no blank lines either at the beginning or the end of the file, or between the
Open the Admin Center.
Select Certificate Manager on the left.
Upload the CA root and intermediate certificates to the Certificate Manager.
Select Settings > Privacy on the left.
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.
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.