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.
SwaggerHub On-Premise is pre-configured for use with Bitbucket.org, so you can start using the Bitbucket integration right away.
To point SwaggerHub On-Premise to your self-hosted Bitbucket Server:
Open the Admin Center.
Select Settings on the left.
In the Integrations section, specify the following settings:
Bitbucket API URL – The URL of your Bitbucket Server, for example,
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.
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.
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:
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.