Helm 依赖项:无法获取 https://...../index.yaml :401 Jfrog Artifactory

问题描述 投票:0回答:1

在尝试更新上传到私有 JFROG Artifactory 的 helm 图表的依赖项时,我在 index.yaml pull 上收到 401。

Helm 图表.yaml

description: test api
apiVersion: v2
name: test-issue
version: 0.1
appVersion: 1.4
...
...

dependencies
- name: test-api
  repository: https://artifacts.xyz.com:443/artifactory/helm-repo
  version: 1.0.0
  alias: test
  condition: test.enabled

步骤:

helm repo add https://artifacts.xyz.com:443/artifactory/helm-repo --username xyz --password yjk --pass-credentials
cd path/to/chart
helm dependency update .

我得到以下输出:

Unable to get an update from the "https://artifacts.xyz.com:443/artifactory/helm-repo/index.yaml":401
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "helm-repo" chart repository
...Successfully got an update....

并且依赖图表不会被下载。

我知道凭据没问题,因为当我尝试错误的密码时,我会收到不同的错误,正如您在此处看到的那样,只有索引失败,而它表示它已成功从存储库获取更新。

kubernetes-helm artifactory jfrog
1个回答
0
投票

经过一段时间的故障排除后,问题出在 chart.yaml

 中存储库 URL 的 
port

description: test api
apiVersion: v2
name: test-issue
version: 0.1
appVersion: 1.4
...
...

dependencies
- name: test-api
  repository: https://artifacts.xyz.com:443/artifactory/helm-repo  # THIS SHOULD NOT HAVE :443
  version: 1.0.0
  alias: test
  condition: test.enabled

解决方案

description: test api
apiVersion: v2
name: test-issue
version: 0.1
appVersion: 1.4
...
...

dependencies
- name: test-api
  repository: https://artifacts.xyz.com/artifactory/helm-repo
  version: 1.0.0
  alias: test
  condition: test.enabled

JFROG UI 可能有点误导,因为当您从artifactory 获取图表 URL 时,它具有端口(加上 https)

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.