> 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.md).

# Bitbucket Data Center を接続する

Aikidoを使うと、Bitbucket Data Centerを接続してリポジトリをスキャンできます。

#### 手順1. Aikidoにサインイン

Aikidoにログインするには **Google** または **Microsoft**.

#### 手順2. Bitbucket Data Centerを選択

SCM選択画面で、 **Bitbucket Data Center**.

<figure><img src="/files/58885d75fc5193f1dab4bc48e3cd66999e7b046c" alt=""><figcaption></figcaption></figure>

#### 手順3. Bitbucketの詳細を追加

以下を入力してください `Bitbucket Data CenterのURL` および `HTTPアクセストークン`.

<figure><img src="/files/92db01e104d39cceffccf6a508d1454858265e59" alt=""><figcaption></figcaption></figure>

以下を確認できます `HTTPアクセストークン` の下で **プロフィール** → **アカウントを管理** → **HTTPアクセストークン** → **トークンを作成**.

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

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

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

**なぜ書き込み権限が必要なのか？**

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

**スキャンのみ必要な場合**

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

<figure><img src="/files/b09208fb2052b88b45f53482affe448722627cc4" alt=""><figcaption></figcaption></figure>

#### 手順4. プロジェクトを選択

接続したいBitbucketプロジェクトを選択してください。

<figure><img src="/files/14c18d7cb31c4652221682eec947f0435e98b9f0" alt=""><figcaption></figcaption></figure>

#### 手順5. リポジトリを選択して完了

Aikidoにスキャンさせたいリポジトリを選択してください。

セットアップを完了するとスキャンが開始されます。


---

# 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.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.
