Skip to content
Code

GitLab and Bitbucket

Connect GitLab (cloud or self-managed) and Bitbucket Cloud repositories to TraceX with a read-only access token so it can read code and history during investigations.

GitLab and Bitbucket repositories connect with a read-only access token. TraceX reads code and history from them during investigations and conversations. Fix pull requests and pull request review are GitHub-only for now.

Errors point at code. With your repository connected, TraceX can follow a stack trace to the function and line that failed, read the logic around it, and see the recent commits that changed it, instead of stopping at the error message.

Works with GitLab.com and self-managed GitLab.

  1. In GitLab, open the project’s Settings → Access tokens and create a project access token with the scopes read_repository and read_api. Give it the Reporter role and an expiry date you’ll remember to renew.

  2. In TraceX, open Integrations → GitLab and enter:

    Field Value
    Repository path acme/platform/payments-api
    Access token the project access token
    Branch optional; the default branch otherwise
    Self-managed address optional, e.g. gitlab.acme.com

Works with Bitbucket Cloud.

  1. In Bitbucket, open Repository settings → Access tokens and create a repository access token with Repositories: Read.
  2. In TraceX, open Integrations → Bitbucket and enter the repository as workspace/repository, the token, and optionally a branch.

TraceX checks the token with a real read, then stores it encrypted. It’s never shown again.

  • Reads code to trace a failure to the file, function and line.
  • Reads history to see which commits recently changed the code involved.
Problem What to check
The token check fails GitLab needs both read_repository and read_api; Bitbucket needs Repositories: Read. Check the token hasn’t expired.
Self-managed GitLab can’t be reached Your GitLab address must be reachable from the internet. Contact support if it’s on a private network.
Wrong branch is read Set the branch field to the branch that’s deployed to production.

Revoke the token in GitLab or Bitbucket, or disconnect the repository in TraceX.