Skip to content

Commit eb1d8d3

Browse files
fix: crash due to store is nil (#723)
Signed-off-by: Pasha Kostohrys <pavel@codefresh.io>
1 parent 38e2e2e commit eb1d8d3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/argocd/gitcreds.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88

99
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
1010
"github.com/argoproj/argo-cd/v2/util/db"
11+
argoGit "github.com/argoproj/argo-cd/v2/util/git"
1112
"github.com/argoproj/argo-cd/v2/util/settings"
1213

1314
"github.com/argoproj-labs/argocd-image-updater/ext/git"
@@ -43,7 +44,7 @@ func getCredsFromArgoCD(wbc *WriteBackConfig, kubeClient *kube.KubernetesClient)
4344
if !repo.HasCredentials() {
4445
return nil, fmt.Errorf("credentials for '%s' are not configured in Argo CD settings", wbc.GitRepo)
4546
}
46-
return repo.GetGitCreds(nil), nil
47+
return repo.GetGitCreds(argoGit.NoopCredsStore{}), nil
4748
}
4849

4950
// getCredsFromSecret loads repository credentials from secret

0 commit comments

Comments
 (0)