From e714a8eacc5edce218ca96e6a458413f71badf0c Mon Sep 17 00:00:00 2001 From: Vadim Bauer Date: Sun, 28 Feb 2021 19:55:48 +0100 Subject: [PATCH] Before fetching the repository check if the project has container registry enabled. closes #14328 #13353 Signed-off-by: Vadim Bauer --- src/replication/adapter/gitlab/adapter.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/replication/adapter/gitlab/adapter.go b/src/replication/adapter/gitlab/adapter.go index 086d11285..e0f37b205 100644 --- a/src/replication/adapter/gitlab/adapter.go +++ b/src/replication/adapter/gitlab/adapter.go @@ -116,6 +116,11 @@ func (a *adapter) FetchArtifacts(filters []*model.Filter) ([]*model.Resource, er } for _, project := range projects { + if !project.RegistryEnabled { + log.Debugf("Skipping project %s: Registry is not enabled", project.Name) + continue + } + repositories, err := a.clientGitlabAPI.getRepositories(project.ID) if err != nil { return nil, err