helm / chart-testing

CLI tool for linting and testing Helm charts
Apache License 2.0
1.36k stars 215 forks source link

[BUG] 403 when building dependencies in ct lint command #680

Closed fnarvaez-applydigital closed 5 days ago

fnarvaez-applydigital commented 1 month ago

Is this a request for help?:

Yes

Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT

Version of Helm and Kubernetes: Helm version

version.BuildInfo{Version:"v3.16.1", GitCommit:"5a5449dc42be07001fd5771d56429132984ab3ab", GitTreeState:"dirty", GoVersion:"go1.23.1"}

kubectl version

Client Version: v1.30.0
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3

ct version

Version:     3.11.0
Git commit:  a2ecd82b650c223a8d264920fd0bab40de16b915
Date:        2024-04-21
License:     Apache 2.0

What happened: ct lint throws a 403 even if login succeeded.

ct.yaml ``` remote: origin target-branch: main chart-dirs: - charts chart-repos: - stable=oci://us-docker.pkg.dev helm-extra-args: --timeout=600s --debug helm-repo-extra-args: - stable=--username=oauth2accesstoken --password-stdin validate-maintainers: false ```
ct logs ``` gcloud auth application-default print-access-token | ct lint --config ct.yaml --debug Linting charts... >>> helm version --template {{ .Version }} >>> git rev-parse --is-inside-work-tree >>> git rev-parse --verify origin/main >>> git merge-base origin/main HEAD >>> git diff --find-renames --name-only bc9a323e403a39ffee56c660db4339d7a37efdfe -- charts ------------------------------------------------------------------------------------------------------------------------ Charts to be processed: ------------------------------------------------------------------------------------------------------------------------ springboot-app => (version: "0.0.1", path: "charts/springboot-app") ------------------------------------------------------------------------------------------------------------------------ >>> helm registry login us-docker.pkg.dev --username=oauth2accesstoken --password-stdin Login Succeeded >>> helm dependency build charts/springboot-app Hang tight while we grab the latest from your chart repositories... ...Successfully got an update from the "mongodb" chart repository ...Successfully got an update from the "ingress-nginx" chart repository ...Successfully got an update from the "jetstack" chart repository Update Complete. ⎈Happy Helming!⎈ Saving 1 charts Downloading ch-base from repo oci://us-docker.pkg.dev// Save error occurred: could not download oci://us-docker.pkg.dev///ch-base: ... Error: could not download oci://us-docker.pkg.dev////ch-base: failed to authorize: failed to fetch anonymous token: unexpected status from GET request to https://us-docker.pkg.dev/v2/./.. ```

Also I executed manually the same command but everything goes just fine.

What you expected to happen: Download the dependencies

How to reproduce it (as minimally and precisely as possible):

  1. have a private repository
  2. create a 2 charts, supposed you have A and B and B depends on A, and A already exists in the private registry.

to reproduce it, execute the following command gcloud auth application-default print-access-token | ct lint --config ct.yaml

github-actions[bot] commented 1 week ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 5 days ago

This issue was closed because it has been stalled for 5 days with no activity.