goharbor/harbor

Event based replication failed with registry.gitlab.com

Open

#21,066 建立於 2024年10月20日

在 GitHub 查看
 (3 留言) (2 反應) (0 負責人)Go (28,490 star) (5,235 fork)batch import
area/replicationhelp wantedkind/bugnever-stale

描述

Steps to reproduce

  1. 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)

  2. Push a new image to Harbor project

  3. Verify the new image is replicated to the registry.gitlab.com

  4. 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"}]}]}

貢獻者指南