Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-23783

Repository archive download with CURL command using API Token is not working

XMLWordPrintable

      Issue Summary

      According to the following blogpost, App passwords will be deprecated in favor of API tokens:
      https://www.atlassian.com/blog/bitbucket/bitbucket-cloud-transitions-to-api-tokens-enhancing-security-with-app-password-deprecation

      However, customers are unable to download repository archive using the following curl command on command line:

      curl https://bitbucket.org/<workspace_slug>/<repo_slug>/get/<ref>.tar.gz

      The above command doesn't work with email and API token, or Bitbucket username and API token combinations. 401 status code is returned and no repository contents are downloaded.

      Steps to Reproduce

      Execute the following command with email and API token, or Bitbucket username and API token and none of them works. 401 status code is returned and no contents are downloaded.

      curl https://bitbucket.org/<workspace_slug>/<repo_slug>/get/<ref>.tar.gz 

      Expected Results

      The customer should be able to download the repository archive using the Curl command.

      This should also be documented if the user should specify User name or the email address along with API token to execute the command.

      Actual Results

      The following command with email and API token, or Bitbucket username and API token and none of them works. 401 status code is returned and no contents are downloaded.

      curl https://bitbucket.org/<workspace_slug>/<repo_slug>/get/<ref>.tar.gz 

      Workaround

      Use User name and App password

              Unassigned Unassigned
              skhandelwal@atlassian.com Sandeep K
              Votes:
              6 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: