Two of Skipper's remote-registry operations fail against a Harbor registry. Harbor's token service only accepts GET, and Harbor requires every repository to live under a project (<project>/<repo>), rejecting single-segment names — both stricter than some other registries.
1. skipper rmi -r fails with 405
utils.delete_image_from_registry issues the manifest DELETE through HttpBearerAuth. On the 401 Bearer challenge, requests_bearer fetches the token by copying the original request, so it sends DELETE to the token endpoint. Harbor's token service only accepts GET and answers with:
405 Method Not Allowed for url:
https://<registry>/service/token?service=harbor-registry&scope=repository:<repo>:delete
GET-based flows (images -r, digest fetch) copy GET and work, so only the delete path breaks.
2. skipper images -r crashes on non-namespaced names
Harbor rejects a single-segment repository name with 400 BAD_REQUEST: invalid repository name. get_remote_image_info only tolerates NAME_UNKNOWN/NOT_FOUND, so BAD_REQUEST raises RuntimeError and aborts the whole listing.
Fix
- Obtain the bearer token for the manifest
DELETE with an explicit GET against the challenge realm, then send the DELETE with the Authorization: Bearer header — never reusing the DELETE method for the token request.
- Treat
BAD_REQUEST like the other "nothing to list" codes: log a warning and skip that image instead of aborting images -r.
Verified against a Harbor registry: push, images -r, and rmi -r all succeed.
Two of Skipper's remote-registry operations fail against a Harbor registry. Harbor's token service only accepts
GET, and Harbor requires every repository to live under a project (<project>/<repo>), rejecting single-segment names — both stricter than some other registries.1.
skipper rmi -rfails with 405utils.delete_image_from_registryissues the manifestDELETEthroughHttpBearerAuth. On the401 Bearerchallenge,requests_bearerfetches the token by copying the original request, so it sendsDELETEto the token endpoint. Harbor's token service only acceptsGETand answers with:GET-based flows (
images -r, digest fetch) copyGETand work, so only the delete path breaks.2.
skipper images -rcrashes on non-namespaced namesHarbor rejects a single-segment repository name with
400 BAD_REQUEST: invalid repository name.get_remote_image_infoonly toleratesNAME_UNKNOWN/NOT_FOUND, soBAD_REQUESTraisesRuntimeErrorand aborts the whole listing.Fix
DELETEwith an explicitGETagainst the challenge realm, then send theDELETEwith theAuthorization: Bearerheader — never reusing theDELETEmethod for the token request.BAD_REQUESTlike the other "nothing to list" codes: log a warning and skip that image instead of abortingimages -r.Verified against a Harbor registry:
push,images -r, andrmi -rall succeed.