flux-check-hook icon indicating copy to clipboard operation
flux-check-hook copied to clipboard

Private Helm Repository cannot be reached

Open nickperkins opened this issue 3 years ago • 2 comments

Issue

If a Helm repository requires authentication to access, the pre-commit hook is unable to access it.

Error: looks like "https://charts.private.repo.test/" is not a valid chart repository or cannot be reached: failed to fetch https://charts.private.repo.test/index.yaml : 401 Unauthorized

Reproduction

Add HelmRepository resource that requires authentication for access. For example:

apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: HelmRepository
metadata:
  name: myrepo
  namespace: flux-system
spec:
  interval: 1m0s
  url: https://charts.private.repo.test/
  secretRef:
    name: helmrepo-credentials

nickperkins avatar Nov 29 '21 05:11 nickperkins

FYI https://github.com/helm/helm/pull/9760 might resolve this issue

nickperkins avatar Nov 29 '21 05:11 nickperkins

thanks for pointing this out, the linked issue looks like a great way to solve this, I think it's not worth doing anything without that, it would be quite complex trying to figure out the username and password from the secretRef

tarioch avatar Nov 30 '21 21:11 tarioch