Bitbucket Data Center icon

Bitbucket Data Center

Interact with Bitbucket Data Center API

Actions29

Overview

This node interacts with the Bitbucket Data Center API to manage repositories and related resources. Specifically, for the Repository resource with the Fork operation, it allows users to create a fork of an existing repository within a specified project.

Common scenarios where this node is beneficial include:

  • Automating repository management workflows in Bitbucket Data Center.
  • Creating forks programmatically as part of CI/CD pipelines or development workflows.
  • Integrating Bitbucket repository operations into broader automation tasks without manual intervention.

For example, a user can automate the process of forking a repository before applying changes or running tests on the forked copy, enabling streamlined collaboration and code review processes.

Properties

Name Meaning
Authentication Method used to authenticate API requests. Options: "Personal Access Token", "Basic Auth"
Project The key of the project containing the repository to fork.
Repository The slug (identifier) of the repository to fork.

Output

The output JSON contains the response from the Bitbucket Data Center API after attempting to fork the specified repository. This typically includes details about the newly created forked repository such as its name, slug, project information, and other metadata returned by the API.

No binary data output is produced by this operation.

Dependencies

  • Requires access to a Bitbucket Data Center instance.
  • Requires either a personal access token or basic authentication credentials configured in n8n.
  • The node depends on the Bitbucket Data Center REST API endpoints for projects and repositories.
  • Proper permissions are needed on the Bitbucket server to perform repository fork operations.

Troubleshooting

  • Common issues:

    • Incorrect project key or repository slug will cause the API call to fail.
    • Insufficient permissions for the authenticated user to fork repositories.
    • Network connectivity issues to the Bitbucket Data Center server.
    • Using unsupported operations or resources will throw errors.
  • Error messages:

    • "Bitbucket Data Center API request failed: <error message>" indicates an issue with the API call, such as authentication failure, invalid parameters, or server errors.
    • "The operation \"fork\" is not supported for resource \"repository\"" would indicate a misconfiguration but should not occur if using the correct operation.
    • If the node throws an error about missing required parameters like project key or repository slug, ensure these are correctly set.
  • Resolution tips:

    • Verify that the project key and repository slug exist and are accessible.
    • Confirm that the authentication credentials have the necessary scopes/permissions.
    • Check network access to the Bitbucket Data Center server URL.
    • Enable "Continue On Fail" in the node settings to handle errors gracefully during batch executions.

Links and References

Discussion