> 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/uv-private-packages.md).

# UV - プライベートパッケージ

Aikido がプライベートパッケージを含む依存関係を更新するには、正確な lockfile の更新を生成できるように、プライベートレジストリへのアクセスが必要です。UV では、適切な **環境変数** Aikido内で。

## パッケージインデックスの認証情報 <a href="#adding-credentials-with-environment-variables" id="adding-credentials-with-environment-variables"></a>

もし [パッケージインデックスを追加する場合、](https://docs.astral.sh/uv/concepts/indexes/) 認証が必要な `pyproject.toml` に対しては、Aikido で環境変数を設定することで、インデックスのユーザー名とパスワードを指定できます。環境変数は次の形式で作成する必要があります:

* `UV_INDEX_[INDEX_NAME]_USERNAME`
* `UV_INDEX_[INDEX_NAME]_PASSWORD`

ここで `[INDEX_NAME]` は、あなたが `pyproject.toml` ファイルで指定したデータソース名を大文字にしたものです。たとえば、 `UV_INDEX_PYTORCH_USERNAME` および `UV_INDEX_PYTORCH_PASSWORD` を次のプロジェクトファイルに対して設定します:

```
[[tool.uv.index]]
name = "pytorch"
url = "https://download.pytorch.org/whl/cpu"
```

Autofix を介して PR を作成する際、Aikido は次を実行するときにこれらの環境変数を含めます `uv` コマンド。

## デフォルトインデックスの設定 <a href="#adding-credentials-for-gcp-artifact-registry" id="adding-credentials-for-gcp-artifact-registry"></a>

デフォルトインデックスを上書きする場合で、あなたの `pyproject.toml` ファイルにインデックスを追加する代わりに、 `UV_DEFAULT_INDEX` 環境変数を Aikido で設定できます。

## Aikido での設定

以下の手順に従って、Aikido をプライベートレジストリで認証するように設定できます：

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

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

3. 「UV」セクションを選択します。

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

4. 環境変数を追加します（例: `UV_DEFAULT_INDEX`）。ビルドファイルに必要なすべての環境変数は、 `UV_` が許可されます。
5. 「*レジストリを接続*」をクリックして設定を保存します。


---

# 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/uv-private-packages.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.
