Skip to content

The Nx Cloud + Bitbucket Integration lets you access the result of every run—with all its logs and build insights—straight from your PR.

API tokens can be generated on a user account level and can be scoped to specific applications like Bitbucket. This is the recommended approach for Nx Cloud integration.

An API token is a secure credential that allows scripts and other processes to authenticate with Bitbucket Cloud applications. You should treat API tokens as securely as any other password.

  1. First, navigate to your BitBucket user security settings
  2. Select "Create API token with scopes"

Create API Token

  1. Give your token a name and proceed to the next step

  2. When prompted to select the app, choose Bitbucket. This ensures the API token can only access Bitbucket APIs and perform git operations:

Select Bitbucket App

  1. The required permissions for Nx Cloud are:
    • read:pullrequest:bitbucket - to read pull request information
    • write:pullrequest:bitbucket - to write comments on pull requests
    • read:repository:bitbucket - to read repository contents
    • write:repository:bitbucket - to write files to the repository

Required Scopes

  1. Click "Create token" and copy your newly created API token

Once your API token is created, head back to your workspace settings on NxCloud to set up the BitBucket integration:

Access VCS Setup

  1. Fill-in all the required fields for selecting your BitBucket repository
  2. Username is found on the account settings screen (it is not your email address)
  3. Paste your API token created earlier into the API Token box
  4. Click "Connect" to finish the setup

If you are using BitBucket Data Center (on-prem) you need to enable an HTTP access token for authentication.

The minimum required permissions are write access to the repository:

Create an Access Token

Once the Access Token is created, save it in a secure location and then head back to your workspace settings on NxCloud and let's set up a BitBucket integration:

Access VCS Setup

  1. Fill-in all the required fields for selecting your Bitbucket repository
  2. Username is found on the account settings screen (it is not your email address)
  3. Paste your Access Token created earlier into the Access Token box
  4. Make sure you give NxCloud the URL of your BitBucket instance (this can be in the simple form of https://your-bitbucket-instance.com)
  5. Click "Connect" to finish the setup