> 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/sonono/private-registries/gcp-artifact-registry.md).

# Google Cloud Artifact Registry

Google Cloud Artifact Registry を中継として設定し、Aikido のレジストリプロキシ経由でレジストリのトラフィックをルーティングします。Artifact Registry は公開レジストリではなく Aikido からパッケージを取得するため、チームがインストールするすべてのパッケージがマルウェア、年齢制限、既知の脆弱性についてチェックされます。

{% stepper %}
{% step %}

### Aikido のプロキシ URL を取得する

移動先 [設定 > レジストリプロキシ](https://app.aikido.dev/issues/fix/extended-lifecycle-support/setup-instructions)、エコシステムを選択してアップストリームプロキシ URL をコピーします

<figure><img src="/files/2182cd5f7e8192bcddbb04f4e6868812d1851b90" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Artifact Registry にリモート リポジトリを作成する

1. Google Cloud Console で、次へ移動します **Artifact Registry > リポジトリ**.
2. クリック **リポジトリを作成**.
3. リポジトリに名前を付けます。たとえば `aikido`.
4. 設定 **形式** をお使いのエコシステム（npm、Python、または Maven）に合わせます。
5. 設定 **リポジトリ モード** を次に設定します: **リモート**.
6. 次の場所で **リモート リポジトリ ソース**、 **カスタム**.
7. で **カスタム リポジトリ** フィールドに、手順 1 で取得した Aikido プロキシ URL を貼り付けます。
8. 設定 **リモート リポジトリの認証モード** を次に設定します: **認証なし**.
9. を選択します。 **リージョン** に移動し、 **作成**.

{% hint style="warning" %}
その **カスタム リポジトリ URL** は作成後は変更できません。変更する必要がある場合は、リポジトリを削除して新しいものを作成してください。
{% endhint %}
{% endstep %}

{% step %}

### （任意）仮想リポジトリを作成する

内部パッケージも Artifact Registry の Standard リポジトリに公開している場合は、両方を集約する Virtual リポジトリを作成します:

1. 移動先 **Artifact Registry > リポジトリ > リポジトリを作成**.
2. 設定 **形式** をリモート リポジトリに合わせて **リポジトリ モード** を次に設定します: **仮想**.
3. ステップ 2 の Standard リポジトリとリモート リポジトリを上流リポジトリとして追加します。
4. 各上流リポジトリに優先度を割り当てます。パッケージが複数の上流に存在する場合は、優先度の高いものが優先されます。
5. 代わりにパッケージマネージャーを Virtual リポジトリの URL に向けます。

これにより、Aikido経由で内部パッケージと外部プロキシ経由のパッケージの両方を提供する、チーム向けの単一のレジストリエンドポイントが得られます。
{% endstep %}

{% step %}

### 開発者マシンで Artifact Registry を使用するように設定する

各開発者のパッケージマネージャーを Artifact Registry リポジトリ（作成した場合は Virtual リポジトリ）に向けます。正確な手順は Google Cloud のドキュメントを参照してください:

{% tabs %}
{% tab title="npm" %}
[npm の認証を設定する](https://cloud.google.com/artifact-registry/docs/nodejs/authentication)
{% endtab %}

{% tab title="Python" %}
[Python の認証を設定する](https://cloud.google.com/artifact-registry/docs/python/authentication)
{% endtab %}

{% tab title="Maven" %}
[Maven の認証を設定する](https://cloud.google.com/artifact-registry/docs/java/authentication)
{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}

### (任意) Device Protection で公開レジストリをブロックする

Artifact Registry を導入しても、開発者はパッケージマネージャーを公開レジストリに直接向けることで回避できます。すべてのトラフィックがプライベート レジストリを経由するよう強制するには、Aikido Device Protection を展開してください。

{% content-ref url="/pages/7fa47c5a1ee5b3c664f0ab37ca9a23372513ddeb" %}
[公開パッケージレジストリをブロック](/docs/docs-ja/aikido-device-protection/using-aikido-endpoint/block-public-package-registries.md)
{% endcontent-ref %}
{% endstep %}
{% endstepper %}


---

# 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/sonono/private-registries/gcp-artifact-registry.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.
