Unable to import exported Bitbucket Server projects and repositories due to SSL issue

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

The curl  command for importing projects and repositories into a Bitbucket Data Center instance fails and no output is provided by the command.

Environment

Bitbucket Data Center version 5.14 and newer

Diagnosis

A curl command similar to the following is run in order to start the import:

1 curl -s -n -u admin:secretpwd -X POST -H 'Content-type: application/json' -d '{"archivePath":"Bitbucket_export_1.tar"}' https://localhost:8443/rest/api/1.0/migration/imports | jq .

Expected result

The command should print some output similar to the following:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 { "id": 1, "initiator": { "name": "admin", "emailAddress": "admin@mybitbucket.com", "id": 52, "displayName": "The Admin", "active": true, "slug": "admin", "type": "NORMAL", "links": { "self": [ { "href": "https://localhost:8443/users/admin" } ] } }, "nodeId": "aaa35131-b8cb-4ef0-9934-7dadb70d8a74", "progress": { "percentage": 0 }, "startDate": 1617720659322, "state": "INITIALISING", "type": "com.atlassian.bitbucket.migration.import", "updateDate": 1617720659322 }

Actual result

The command produces no output.

Adding the -v switch (to increase verbosity) to that curl   command will show this output:

1 2 3 4 5 6 curl: (60) SSL certificate problem: self signed certificate More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.

Cause

The SSL certificate that Bitbucket Data Center is presenting to curl  is not trusted.

Solution

Ensure you are using a certificate signed by a well-known Certificate Authority so that it will be trusted automatically.

Workaround

You can add the -k parameter to the curl  command to bypass the certificate check, and prevent failure.

Updated on February 25, 2025

Still need help?

The Atlassian Community is here for you.