> 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/autofix-to/connect-private-packages/bundle-private-gems.md).

# Bundler - プライベートGem

Aikido が private gem を含む依存関係を更新するには、正確な AutoFix を生成できるように、private gem へのアクセスが必要です。これに対して、Aikido で private gem registry の設定を提供できるようになりました。

## Aikido での設定 - Private RubyGems Registry <a href="#configuration-in-aikido---private-rubygems-registry" id="configuration-in-aikido---private-rubygems-registry"></a>

以下の手順に従うことで、依存関係を更新する際に Aikido が private RubyGems registry で認証できるよう設定できます：

1. Aikido の autofixer のアカウント設定ページに移動します。 [こちら](https://app.aikido.dev/issues/fix/settings).
2. 「Connect Registry」をクリックすると、private registry のモーダルが表示されます

<figure><img src="/files/93d539d9c2979772d40a2c418b778a2cd588532f" alt=""><figcaption></figcaption></figure>

3. 「Bundler」を選択します。以下の例では、private GitHub RubyGems registry の設定例を示しています。環境変数のキーは `BUNDLE_RUBYGEMS__PKG__GITHUB__COM`、値は GitHub のアクセス トークンで、 `read:packages` スコープを持っています。これは使用する private registry に応じて異なります。

<figure><img src="/files/6096762344c0ace29354571a0e8ebe0dea594b15" alt=""><figcaption></figcaption></figure>

3. 「Connect Registry」をクリックして設定を保存します。

## Aikido での設定 - Private Git Repository <a href="#configuration-in-aikido---private-rubygems-repository" id="configuration-in-aikido---private-rubygems-repository"></a>

### 同じ SCM 組織 <a href="#same-scm-organization" id="same-scm-organization"></a>

gem の private git repository が、自動修正対象のコードと同じ組織にある場合、既存のアクセス トークンの権限を拡張して private repository へのアクセスを含めることができます [こちら](https://app.aikido.dev/issues/fix/settings).

### 異なる SCM 組織 <a href="#different-scm-organization" id="different-scm-organization"></a>

以下の手順に従うことで、依存関係を更新する際に Aikido が private RubyGems の git repository で認証できるよう設定できます：

1. Aikido の autofixer のアカウント設定ページに移動します。 [こちら](https://app.aikido.dev/issues/fix/settings).
2. 「Connect Registry」をクリックし、次に Bundler を選択します。

<figure><img src="/files/41a4a26e72e9fe81e004934673776449d81c4973" alt=""><figcaption></figcaption></figure>

上の例では、private GitHub Git repository の設定例を示しています。環境変数のキーは `BUNDLE_GITHUB__COM`、値は repository アクセス権を持つ GitHub のアクセス トークンです。

| プロバイダー       | 環境変数キー                   | 値の形式                               |
| ------------ | ------------------------ | ---------------------------------- |
| GitHub       | `BUNDLE_GITHUB__COM`     | `x-access-token:your-access-token` |
| GitLab       | `BUNDLE_GITLAB__COM`     | `oauth2:your-access-token`         |
| Bitbucket    | `BUNDLE_BITBUCKET__ORG`  | `x-token-auth:your-access-token`   |
| Azure DevOps | `BUNDLE_DEV__AZURE__COM` | `:your-access-token`               |

3. 「Connect Registry」をクリックして設定を保存します。


---

# 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/autofix-to/connect-private-packages/bundle-private-gems.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.
