summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpasha-codefresh <pavel@codefresh.io>2024-05-27 18:41:14 +0300
committerGitHub <noreply@github.com>2024-05-27 11:41:14 -0400
commiteb1d8d30bb22cb82928df64fd5028fa978f8cb5b (patch)
tree86f150833f020d87a50819e74d22999d7dfe442b
parent38e2e2e87e49326da8de6dddd184ce2aea3fdef8 (diff)
fix: crash due to store is nil (#723)
Signed-off-by: Pasha Kostohrys <pavel@codefresh.io>
-rw-r--r--pkg/argocd/gitcreds.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/argocd/gitcreds.go b/pkg/argocd/gitcreds.go
index 46336cf..2716659 100644
--- a/pkg/argocd/gitcreds.go
+++ b/pkg/argocd/gitcreds.go
@@ -8,6 +8,7 @@ import (
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/v2/util/db"
+ argoGit "github.com/argoproj/argo-cd/v2/util/git"
"github.com/argoproj/argo-cd/v2/util/settings"
"github.com/argoproj-labs/argocd-image-updater/ext/git"
@@ -43,7 +44,7 @@ func getCredsFromArgoCD(wbc *WriteBackConfig, kubeClient *kube.KubernetesClient)
if !repo.HasCredentials() {
return nil, fmt.Errorf("credentials for '%s' are not configured in Argo CD settings", wbc.GitRepo)
}
- return repo.GetGitCreds(nil), nil
+ return repo.GetGitCreds(argoGit.NoopCredsStore{}), nil
}
// getCredsFromSecret loads repository credentials from secret