# GitLab 镜像仓库

### 您需要随手准备

* [x] 您的 Gitlab 注册表完整仓库名称
* [x] 您的 Gitlab 个人访问令牌 或 部署令牌

### 访问令牌 或 部署令牌

您可以按照此 [**教程**](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html) 以生成个人访问令牌

或

您可以按照此 [**教程**](https://docs.gitlab.com/ee/user/project/deploy_tokens/index.html) 以生成部署令牌

### 拆分完整仓库名称

以此完整仓库为例： **registry.gitlab.com/组/项目**

您的 **仓库** 将是： **registry.gitlab.com**

而您的 **镜像** 将是： **group/project**

### 在 Edgegap 上添加应用

#### **API 示例**

```json
{
    [...]
    "docker_repository": "registry.gitlab.com",
    "docker_image": "group/project",
    "docker_tag": "v1",
    "private_username": "example@edgegap.com",
    "private_token": "<个人访问令牌 或 部署令牌>",
    [...]
}
```

#### **来自仪表板**

在我们的仪表板中， **私有注册表令牌** 将是您 **个人访问令牌 或 部署令牌**

<figure><img src="/files/ba257f1ca43308fd2d29d5b21de53c0e1bdbcc0a" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: 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:

```
GET https://docs.edgegap.com/zh/docs/tools-and-integrations/container/external-registries/gitlab-registry.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
