From 33a1e2a5afa46d05d9d438451f4472dd988dd44d Mon Sep 17 00:00:00 2001 From: doxsch <28098153+doxsch@users.noreply.github.com> Date: Fri, 22 Dec 2023 13:32:59 +0100 Subject: [PATCH] fix: added logging if repo credentials collide Signed-off-by: doxsch <28098153+doxsch@users.noreply.github.com> --- util/db/repository_secrets.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util/db/repository_secrets.go b/util/db/repository_secrets.go index 31152300b0b8b..2d96c1c3a99eb 100644 --- a/util/db/repository_secrets.go +++ b/util/db/repository_secrets.go @@ -489,6 +489,9 @@ func (s *secretsRepositoryBackend) getRepositoryCredentialIndex(repoCredentials for i, cred := range repoCredentials { credUrl := git.NormalizeGitURL(string(cred.Data["url"])) if strings.HasPrefix(repoURL, credUrl) { + if len(credUrl) == max { + log.Warnf("Found multiple credentials for repoURL: %s", repoURL) + } if len(credUrl) > max { max = len(credUrl) idx = i