goharbor / harbor

An open source trusted cloud native registry project that stores, signs, and scans content.
https://goharbor.io
Apache License 2.0
23.93k stars 4.74k forks source link

Pull from public /v2 repository without authentication returns 401 unauthorized #19586

Closed jncanches closed 11 months ago

jncanches commented 11 months ago

Hi

Using Harbor V2.9.1. I have push a bunch of helm artifacts to a public harbor project. Pulling this using oci works like a charm. Using /v2/ http url does not.

My main issue is that I have added my helm repo to Portainer. It founds my app, but when I try to deploy it, it fails with 401 unauthorized becuase it calls the https://my_harbor_url/v2/my_projects/my_project.0.0.1.tgz

I have read some issues that looks like mine but they are marked as closed.

Any idea ? Maybe a parameter I missed when deploying my Harbor instance ?

Vad1mo commented 11 months ago

sorry the problem description is not clear, is it about chartmuseum or OCI charts?

AllForNothing commented 11 months ago

@jncanches This is an expected behavior. You can not download the helm artifact through the v2 API

jncanches commented 11 months ago

sorry the problem description is not clear, is it about chartmuseum or OCI charts?

Sorry if my description was not enough clear. It's about tying to download OCI charts via v2 API. But @AllForNothing answered and stated that OCI charts cannot be downloaded using v2 API.

I am ok with that. I think the problem is probably Portainer side which will always try to download helm artifact using v2 API event from an OCI repository.

This issue can be close. Thank all of you for your time.