area/replicationhelp wantedkind/bugnever-stale
描述
Steps to reproduce
-
Setup a event based replication from Harbor to registry.gitlab.com, which support delete remote resource when local resource is deleted. the token in registry.gitlab.com should have full access to the registry(read_registry, write_registry)
-
Push a new image to Harbor project
-
Verify the new image is replicated to the registry.gitlab.com
-
Delete the new image in the Harbor, it should trigger a replication job to delete the image from registry.gitlab.com, but the replication failed with following error message:
error message:
2024-10-20T04:55:39Z [INFO] [/controller/replication/transfer/image/transfer.go:140]: client for source registry [type: harbor, URL: https://core:8443, insecure: false] created
2024-10-20T04:55:39Z [INFO] [/controller/replication/transfer/image/transfer.go:150]: client for destination registry [type: gitlab, URL: https://registry.gitlab.com, insecure: true] created
2024-10-20T04:55:41Z [ERROR] [/controller/replication/transfer/image/transfer.go:533]: failed to delete the manifest of artifact harbor424542/harbor-ci/test_push_repli:v1.1.0 on the destination registry: http status code: 401, body: {"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":[{"Type":"repository","Class":"","Name":"harbor424542/harbor-ci/test_push_repli","ProjectPath":"","Action":"delete"}]}]}