Configure Atlassian Bitbucket Data Center and the Git Integration

Configuration for the SnapLogic Git Integration to use Bitbucket Data Center.

The SnapLogic Platform supports Atlassian Bitbucket Data Center for integrated version control, which allows you to manage SnapLogic assets including pipelines and tasks to and from Bitbucket repositories and branches. This integration supports two authentication modes for Bitbucket API calls:

  • Basic authentication (username and HTTP access token)

  • SSH key authentication (SSH public/private key pair and HTTP access token when basic authentication to API calls is disabled)

Note:

An HTTP access token is required at all times, regardless of the authentication mode. However, SSH key authentication is required when your organization has disabled basic authentication on the Bitbucket Datacenter API. This configuration is done at the Environment level by the Environment Admin.

Benefits

The SnapLogic Bitbucket Integration has the following benefits:

  • Ability to manage SnapLogic assets in Bitbucket projects and repositories.
  • Seamless version control: Developers can manage versioning directly within SnapLogic, eliminating the need to switch tools.
  • Streamlined development workflows: Reduces complexity and manual effort, enabling faster, more efficient development cycles.
  • Enhanced collaboration: Centralized platform improves coordination across teams and ensures consistency in development practices.
  • Reduced error rates: Minimizes human error by automating critical version control and deployment steps.
  • Improved audit readiness and maintainability: Robust asset tracking and documentation facilitate compliance, support audits, and ensure long-term sustainability.

To use Atlassian Bitbucket Data Center, register SnapLogic with Atlassian Bitbucket and configure the Git Integration feature in your SnapLogic environment.

  • In Atlassian, you need:
    • Bitbucket installed to handle user authentication requests.
    • One or more Bitbucket repositories for SnapLogic assets.
  • In the SnapLogic environment:

Basic authentication for Bitbucket

To set up the Bitbucket repositories in SnapLogic, establish proper authentication and configure the Git provider settings.

  1. Access the Bitbucket Repository
    1. Navigate to your Bitbucket workspace and click on the Snaplogic project link to open it.

      This displays all repositories within the project.

    2. Click on the repository to view its contents and verify you have Project write and Repository write access to the appropriate repositories and SnapLogic projects for the token.
    3. Navigate to the HTTP access tokens and click Create token to generate tokens. You can generate any number of tokens for any number of SnapLogic users to use. option to authenticate the configuration.

      bitbucket-permissions

  2. In SnapLogic Admin Manager, navigate to System Configuration and select Git Integration.
    1. Select Atlassian Bitbucket Data Center (the label might say Atlassian Bitbucket) as the Git provider and configure the following fields:
      • Bitbucket Auth: The Basic Auth header value to securely connect to Bitbucket. Example: c25hcGxvZ2ljX3VzZXI6TXlTZWNyZXRQYXNzd29yZDEyM
      • Bitbucket APIs URL: The root URL of your Bitbucket Data Center instance https://<bitbucket-hostname>. Example: https://bitbucket.company.com
        bb-dc-git-integration

SSH Authentication for Bitbucket

When basic authentication for API calls is disabled in Bitbucket Data Center, SSH authentication is required because Bitbucket Data Center does not support REST APIs for blobs, trees, and commits, and it does not recognize token requests in Git. You must provide SSH keys in addition to your HTTP access token.
Bitbucket Data Center setting showing basic authentication for API calls disabled.
Prerequisites
  • You must have the Org Admin role in SnapLogic.

  • Each SnapLogic user who will access Git operations must have an HTTP access token associated with their Bitbucket account. HTTP access tokens are required regardless of whether SSH authentication is enabled. Learn more about creating an HTTP access token.

  • If SSH authentication is required, obtain the SSH hostname from your Bitbucket Data Center administrator.

Steps
  1. In SnapLogic Admin Manager, select Git Integration under SYSTEM CONFIGURATION.
  2. On the Git Integration page, select Atlassian Bitbucket Data Center as the Git Integration type.
  3. Turn off the toggle for Allow basic authentication on API calls (this setting reflects your Bitbucket Data Center server configuration) and specify the following values:
    1. Bitbucket Auth URL: The Bitbucket Auth URL to securely connect to the Bitbucket. Example: https://bitbucket.company.com

    2. Bitbucket APIs URL: The root URL of your Bitbucket Data Center instance <https://<bitbucket-hostname>. Example: https://bitbucket.company.com

    3. SSH host: Enter your Bitbucket Data Center SSH host beginning with ssh://, for example, ssh://[email protected]:7999/project-key/repository-name.git

      bitbucket-ssh-authentication
  4. Click Save.
  5. On the User profile, select Bitbucket credentials.
    select-bitbucket-credentials-on-the-user-menu
  6. Provide the following values. Generate an SSH key pair if you do not already have one (for example, using ssh-keygen on a local machine). Retain both the public and private keys.

    1. HTTP Access Token: Personal HTTP access token generated in Bitbucket Data Center. This is required for all API calls regardless of the authentication mode. Learn more.

    2. SSH public key: Paste the full contents of your public key file (for example, the output of your id_rsa.pub file).

    3. SSH private key: Paste the full contents of your private key file. This value will be encrypted.

      bitbucket-ssh-keys
    4. Click Save.
    Note: The SSH Private Key is sensitive. Ensure you are pasting the private key (not the public key) into the SSH Private Key field. Once saved, the key cannot be retrieved from the SnapLogic UI.

Verify the authentication

  1. On the top-right, click your user profile and select Git authorization.

    git-authorization
    After successful authorization, the following message displays, and you can proceed to check out your Git repository.
    message-after-successful-git-login

Create a personal HTTP access token

  1. In Bitbucket Data Center, select your profile icon, and then select Manage account.

  2. In the left navigation pane, select HTTP access tokens, and then click Create token.bitbucket-http-access-token

  3. Provide a token name, set the required permissions (at minimum, Repository Read and Repository Write), and select Create.
  4. Copy and save the token value. It is displayed only once.

Authorize SnapLogic with Bitbucket Data Center

After the admin saves the org-level settings, users authorize SnapLogic to access their Bitbucket accounts.

  1. In the SnapLogic Project Manager, open a project to track a Bitbucket repository, or begin the checkout flow for a new repository.
  2. When prompted, select Authorize with Bitbucket Data Center.
  3. Follow the prompts to authenticate with your Bitbucket credentials.

Troubleshooting

Error Resolution
Authentication error after saving credentials
  • Verify that the HTTP access token is valid and has not expired in Bitbucket Datacenter.
  • If SSH authentication is required, confirm that the SSH public key saved in SnapLogic matches the key registered in your Bitbucket account under SSH keys.
  • Confirm that the private key in SnapLogic corresponds to the public key registered in Bitbucket.
  • If authentication fails, verify that your HTTP access token is valid and not expired, and that the SSH keys are correctly formatted (the public key should begin with ssh-rsa or similar, and the private key should begin with -----BEGIN RSA PRIVATE KEY----- or the equivalent for your key type).
SSH connection refused or timed out
  • Confirm with your Bitbucket admin that the SSH Host and SSH Port values in Admin Manager are correct.
  • Check that your network or firewall allows outbound connections from the SnapLogic Cloudplex (or your Groundplex) to the configured SSH host and port. Verify that the SSH service is running on the Bitbucket Data Center server.
SSH Host and SSH key fields are not visible in Admin Manager The SSH Host and SSH keys are visible only when Allow basic authentication on API calls is disabled in Bitbucket and in Admin Manager.
The SnapLogic environment is configured to connect to Atlassian Bitbucket Data Center.
Have users authorize SnapLogic to access Atlassian Bitbucket Data Center. After you have configured and authorized, use Git operations to meet your organization's processes and requirements. Learn more.