code.gitea.io/gitea@v1.22.3/docs/content/usage/packages/helm.zh-cn.md (about)

     1  ---
     2  date: "2022-04-14T00:00:00+00:00"
     3  title: "Helm Chart 注册表"
     4  slug: "helm"
     5  sidebar_position: 50
     6  draft: false
     7  toc: false
     8  menu:
     9    sidebar:
    10      parent: "packages"
    11      name: "Helm"
    12      sidebar_position: 50
    13      identifier: "helm"
    14  ---
    15  
    16  # Helm Chart 注册表
    17  
    18  为您的用户或组织发布 [Helm](https://helm.sh/) charts。
    19  
    20  ## 要求
    21  
    22  要使用 Helm Chart 注册表,可以使用诸如 `curl` 或 [`helm cm-push`](https://github.com/chartmuseum/helm-push/) 插件之类的简单HTTP客户端。
    23  
    24  ## 发布软件包
    25  
    26  通过运行以下命令来发布软件包:
    27  
    28  ```shell
    29  curl --user {username}:{password} -X POST --upload-file ./{chart_file}.tgz https://gitea.example.com/api/packages/{owner}/helm/api/charts
    30  ```
    31  
    32  或者使用 `helm cm-push` 插件:
    33  
    34  ```shell
    35  helm repo add  --username {username} --password {password} {repo} https://gitea.example.com/api/packages/{owner}/helm
    36  helm cm-push ./{chart_file}.tgz {repo}
    37  ```
    38  
    39  | 参数         | 描述                                                                                                                                                   |
    40  | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
    41  | `username`   | 您的Gitea用户名                                                                                                                                        |
    42  | `password`   | 您的Gitea密码。如果您使用的是2FA或OAuth,请使用[个人访问令牌](development/api-usage.md#通过-api-认证)替代密码进行身份验证。 |
    43  | `repo`       | 仓库名称                                                                                                                                               |
    44  | `chart_file` | Helm Chart 归档文件                                                                                                                                    |
    45  | `owner`      | 软件包的所有者                                                                                                                                         |
    46  
    47  ## 安装软件包
    48  
    49  要从注册表中安装Helm Chart,请执行以下命令:
    50  
    51  ```shell
    52  helm repo add  --username {username} --password {password} {repo} https://gitea.example.com/api/packages/{owner}/helm
    53  helm repo update
    54  helm install {name} {repo}/{chart}
    55  ```
    56  
    57  | 参数       | 描述                        |
    58  | ---------- | --------------------------- |
    59  | `username` | 您的Gitea用户名             |
    60  | `password` | 您的Gitea密码或个人访问令牌 |
    61  | `repo`     | 存储库的名称                |
    62  | `owner`    | 软件包的所有者              |
    63  | `name`     | 本地名称                    |
    64  | `chart`    | Helm Chart的名称            |