-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Harbor to support cross-repository mount #17097
Comments
To add a little context, when attempting a cross-repository mount from a non-existent source repository (the I'm not familiar with the harbor codebase but this comment seems to indicate that it wasn't clear what to do in this case, but I believe the spec has been clarified now? cc @reasonerjt harbor/src/server/middleware/artifactinfo/artifact_info.go Lines 83 to 84 in 44f477e
|
This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days. |
This issue is still happening, harbor is not following registry spec |
This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days. |
Still happening |
thanks @adriannieto-attechnest I will take time to investigate it, Harbor should align the distrubtion spec. |
This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days. |
This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days. |
@jonjohnsonjr @adriannieto-attechnest , currently Harbor does support
And Harbor (v2.8.2) doesn't officially support
And it does return 401 when doing the
I'm thinking enabling |
As for this error:
This is because Harbor wraps the NOT_FOUND error to be UNAUTHORIZED with the middleware here: harbor/src/server/middleware/v2auth/auth.go Line 167 in fb52fdb
This is not only the way for POST /v2/<name>/blobs/uploads/?mount=<digest>&from=<other_name> , but also the current behavior for some other APIs. This behavior does be different from distribution spec. And we can track it in this issue:
|
hi, is this issue fixed by which PR? |
Hi all,
All above situations return 202 from distribution directly, harbor did nothing to intercept the response.
|
As per https://github.com/opencontainers/distribution-spec/blob/main/spec.md#mounting-a-blob-from-another-repository Harbor should return a 202 (https://docs.docker.com/registry/spec/api/#cross-repository-blob-mount)
Crane (but potentially other libraries) has implemented this feature which is causing tools relying on cross-repository mounts to not work anymore to with Harbor (google/go-containerregistry#1393 google/go-containerregistry#1388)
This issue is happening in the very latest Harbor version.
Versions: Harbor 2.5.1, Helm chart: 1.9.1
Additional context:
The text was updated successfully, but these errors were encountered: