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

# Bitbucket Server

> Connect a self-hosted Bitbucket Server or Data Center instance so Bugzy can clone repositories, push branches, and open pull requests.

The Bitbucket Server integration connects Bugzy to a self-hosted Bitbucket Server / Data Center instance with a base URL and an HTTP access token. Once connected, the agent can enumerate the repositories the token authorizes, clone them into its workspace, push branches, and open pull requests.

## What Bitbucket Server enables

* **Repository access** — Bugzy lists and clones every repository the access token can read
* **Branch push and pull requests** — session work is pushed as a branch and opened (or reused) as a pull request on your instance
* **Repo-hosted skills** — `SKILL.md` files under `.agents/skills/` in your repositories are loaded into agent sessions automatically

## Requirements

* Bitbucket Server / Data Center reachable from Bugzy over **https** (for firewalled instances, expose it through a secure tunnel)
* An **HTTP access token** (personal access token) with repository read and write permission

## Setup

<Steps>
  <Step title="Create an HTTP access token">
    In Bitbucket, go to **Manage account > HTTP access tokens > Create token**. Grant repository **read** and **write** permission.
  </Step>

  <Step title="Navigate to team integrations">
    Go to **Dashboard > \[Your Team] > Integrations** and find **Bitbucket Server**.
  </Step>

  <Step title="Configure and verify">
    Click **Configure**, enter the instance base URL (for example `https://bitbucket.example.com`) and the access token, then **Save & verify**. Bugzy validates the URL and token against your instance before saving; the token is stored encrypted.
  </Step>
</Steps>

## How pull requests work

When an agent session changes files in a Bitbucket Server repository, Bugzy pushes the work to a session branch and opens a pull request against the default branch. A follow-up turn on the same session updates the branch and reuses the open pull request instead of creating a new one.

## Limitations

* Bitbucket **Cloud** (bitbucket.org) is a separate integration and is not covered by this connector
* Inbound webhooks (for example triggering automations from PR comments) are not yet supported for Bitbucket Server
* Token-based (PAT) authentication only — username/password basic auth is not supported
