Skip to content

Commit

Permalink
fix: crash due to store is nil (#723)
Browse files Browse the repository at this point in the history
Signed-off-by: Pasha Kostohrys <[email protected]>
  • Loading branch information
pasha-codefresh committed May 27, 2024
1 parent b40e984 commit fbc17cf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/argocd/gitcreds.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit fbc17cf

Please sign in to comment.