> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orchestrahq.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# GitLab and Bitbucket

> What Orchestra Local reads from GitLab and Bitbucket repositories, and the sign-in it uses

Orchestra Local works on repositories hosted on GitHub, GitLab (gitlab.com or
self-managed) and Bitbucket Cloud. Your checkout is recognised from its
`origin` remote, with no setup.

## What works

* **Why a line changed** and `orchestra pr describe`, using the merge request
  (GitLab) or pull request (Bitbucket) for your branch.
* **Pull requests, CI and shipping state** for the repository: open and
  merged requests, pipeline runs with the tail of a failing job's log, and
  recent tags. GitLab reads releases and deployments too. Bitbucket Cloud has
  no releases, and deployments are not read.
* **Code search and file reads** come from your checkout, as on every host.

Everything is read from your laptop with your own sign-in. Nothing passes
through Orchestra's servers.

## Sign in

Orchestra uses a sign-in you already have and never prompts. It looks in this
order and takes the first it finds.

| Host | Order |
| - | - |
| GitLab | `GITLAB_TOKEN` or `GL_TOKEN`, then the token `glab auth login` saved, then your git credential helper |
| Bitbucket | `BITBUCKET_TOKEN`, then `BITBUCKET_EMAIL` with `BITBUCKET_API_TOKEN`, then `BITBUCKET_USERNAME` with `BITBUCKET_APP_PASSWORD`, then your git credential helper (with `BITBUCKET_EMAIL` set, its token is paired with that email) |

With none, requests go out anonymously and only public repositories answer.
For a private repository, a GitLab token needs the `api` scope, and a
Bitbucket token needs repository and pull request scopes (add pipelines read for CI state).
An Atlassian API token signs the Bitbucket API with your account email, while git
uses your Bitbucket username, so set `BITBUCKET_EMAIL` when the token comes from
git's credential helper.

Credentials are sent only to that host's own API.

## Not covered yet

Starting cloud sessions on GitLab or Bitbucket repositories is not available.
Connect GitHub covers that today: see [Connect GitHub](https://docs.orchestrahq.ai/connect-github.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.