cathive / concourse-chartmuseum-resource

interacts with a Chart Museum instance or Harbor (Kubernetes Helm Charts storage)
Apache License 2.0
14 stars 9 forks source link

Use headers when fetching the chart #6

Closed dan1el closed 5 years ago

dan1el commented 5 years ago

Our put step was failing after uploading the chart. When trying to fetch the chart data after uploading we got this error message:

Processing chart at "/tmp/build/put/some-charts/charts/some-chart"...

Performing "helm package"...

Inspecting chart file: "/tmp/tmp-915nOqXa3lI2t/some-chart-0.3.0.tgz"...

Uploading chart file: "/tmp/tmp-915nOqXa3lI2t/some-chart-0.3.0.tgz"...

Helm Chart has been uploaded.

- Name: some-chart

- Version: 0.3.0

Fetching chart data from "https://some.chartrepo.io/api/charts/some-chart/0.3.0"...

Download of chart information failed.

{"error":"unauthorized"}

We are using basic auth and have disabled anon GET operations. Turns out the headers generated in out.ts before fetching the uploaded chart is not used by the fetch operation.

headcr4sh commented 5 years ago

Thanks for the PR.