> 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 - プライベートGems

Aikido がプライベート gem を含む依存関係を更新するには、正確な AutoFix を生成できるように、プライベート gem へのアクセスが必要です。これには、Aikido でプライベート gem レジストリの設定を指定できるようになりました。

## Aikido の設定 - プライベート RubyGems レジストリ <a href="#configuration-in-aikido---private-rubygems-registry" id="configuration-in-aikido---private-rubygems-registry"></a>

以下の手順に従って、依存関係を更新する際に Aikido がプライベート RubyGems レジストリで認証するように設定できます:

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

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

3. 「Bundler」を選択します。以下の例では、プライベートな GitHub RubyGems レジストリの可能な設定例を示しています。環境変数のキーは `BUNDLE_RUBYGEMS__PKG__GITHUB__COM`、値は以下の権限を持つ GitHub アクセストークンです。 `read:packages` スコープです。これは使用するプライベートレジストリによって異なります。

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

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

## Aikido の設定 - プライベート Git リポジトリ <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 のプライベート Git リポジトリが、AutoFix の対象となっているコードと同じ組織にある場合は、既存のアクセストークンの権限を拡張してプライベートリポジトリへのアクセスを含めることができます [こちら](https://app.aikido.dev/issues/fix/settings).

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

以下の手順に従って、依存関係を更新する際に Aikido がプライベート RubyGems の Git リポジトリで認証するように設定できます:

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

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

上の例では、プライベートな GitHub Git リポジトリの可能な設定例を示しています。環境変数のキーは `BUNDLE_GITHUB__COM`で、値はリポジトリへのアクセス権を持つ 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.
