> 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 がプライベートパッケージを含む依存関係を更新するには、正確なロックファイルの更新を生成できるように、プライベートレジストリへのアクセスが必要です。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="https://715870456-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyKbzcQGrx7UtrG0nPZZ7%2Fuploads%2Fgit-blob-9266e8da54be5ee4e49440d10a643bfa587a37ac%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://715870456-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyKbzcQGrx7UtrG0nPZZ7%2Fuploads%2Fgit-blob-f65b1a038f3549dc02949c0512a007b995d576d8%2Fimage.png?alt=media" 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.aikido.dev/docs/docs-ja/autofix-to/connect-private-packages/uv-private-packages.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
