> For the complete documentation index, see [llms.txt](https://help.aikido.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.aikido.dev/docs/docs-ja/kdosukyan/connect-your-source-code/connect-bitbucket-data-center/connect-bitbucket-data-center-broker-set-up.md).

# Bitbucket Data Center を接続する（Broker 設定）

Aikido を使うと、自己管理の Bitbucket インスタンスを接続して、コードをスキャンし保護できます。以下の手順に従って、Bitbucket Data Center インスタンスを Aikido に接続してください。

### 始める前に

* この設定を行う人は、Bitbucket Data Center インスタンスの両方にアクセスできる必要があります **と** 接続したい Bitbucket プロジェクト。

## 設定

{% stepper %}
{% step %}
**Aikidoアカウントを作成する**

Bitbucket Data Center インスタンスを接続するには、まず Google または Microsoft を使って Aikido にサインアップするかログインします。 [サインアップ画面](https://app.aikido.dev/login)、クリックし **Google / Microsoft**.
{% endstep %}

{% step %}
**Bitbucket Data Center のセットアップを開始**

認証が完了したら、 **データセンター** Bitbucket セクションで。

![接続するソース管理プロバイダーを選択します: GitHub、Azure DevOps、GitLab、またはBitbucket。](/files/f18d3b30dc0c9e5b39212a3948c642cea9093065)
{% endstep %}

{% step %}
**Brokerアクセスを有効にする**

を有効にします **Aikido broker** 「Advanced Connection Options」セクションのトグルをクリックして。

クリック **グループを作成** して続行します。

![Aikidoの初期設定: GitLab Self-ManagedのURLとアクセストークンを入力して認証します。](/files/b0eff190fcf9a1e989facb953c429197aa0c9c9b)
{% endstep %}

{% step %}
**Brokerを設定する**

以下のガイドを使ってBrokerを設定してください。デプロイしたら、GitLabの設定を完了するためにここに戻ってください。

{% content-ref url="/pages/57eb4d0e1ea0df52e494af68c47a0c2a1e884bc1" %}
[内部アプリケーション向け Aikido Broker](/docs/docs-ja/miscellaneous-info/aikido-broker-for-internal-applications.md)
{% endcontent-ref %}

<figure><img src="/files/939c10803d1ee7e3e59e8abcdd40ea92c8913d5c" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Bitbucket Data Center のセットアップを完了**

ブローカーを作成して環境にデプロイしたら、Bitbucket Data Center のセットアップを完了できます。

まず、 **Broker URL**をコピーします。以下のような形式です:

```
https://55673-355dsfwea68cb.aikidobroker.com
```

次に、 **Bitbucket Server のセットアップを完了**.

<figure><img src="/files/97a8cbf89e00effaf23d73f8491224f781fc9b34" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Broker URLを入力する**

前の手順で取得したBrokerリソースURLを、「server URL」の入力欄に貼り付けます。

<figure><img src="/files/b780753e45a1130a95b11e7bc7d824b0246f94ee" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**HTTP アクセストークンを作成**

次で見つけることができます `HTTPアクセストークン` の下で **プロフィール** → **アカウントを管理** → **HTTPアクセストークン** → **トークンを作成**.

**必要なトークン権限**

Aikidoは、オンプレミスのBitbucketインスタンスに対して以下のトークン権限を要求します:

* **プロジェクト:** 書き込み
* **リポジトリ:** 書き込み

**なぜ書き込み権限が必要なのですか?**

Aikidoの全機能をサポートするには書き込み権限が必要です。これには、AutoFix（マージ可能なPRの作成）とPRチェック（プルリクエストへのステータスチェックとコメントの投稿）が含まれます。

**スキャンだけが必要な場合**

チームがAikidoをリポジトリのスキャンとAIペンテストにのみ使用する場合、 **読み取り権限** で十分です。読み取り専用アクセスのトークンを設定すれば、すべてのスキャン機能は期待どおりに動作します。
{% endstep %}

{% step %}
**インストールを完了する**

をクリックした後、 **次へ、グループを接続**、開始するグループを選択します。後からいつでも追加のグループを接続できます。

最後の手順で、Aikidoで監視したいリポジトリを選択します。
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.aikido.dev/docs/docs-ja/kdosukyan/connect-your-source-code/connect-bitbucket-data-center/connect-bitbucket-data-center-broker-set-up.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
