Interview Prep/GitOps & Argo CD/Repos, Clusters, Projects & Permissions

An SSH repo fails with `ssh: handshake failed: knownhosts: key is unknown`.

BeginnerTroubleshootingRepos, Clusters, Projects & Permissions
Answer

Likely causes → The Git host's SSH key is not in argocd-ssh-known-hosts-cm. Common with self-hosted GitLab/Bitbucket, or after the host rotated its key.

Diagnose → argocd cert list --cert-type ssh and compare with ssh-keyscan git.example.com.

Fix →

ssh-keyscan git.example.com | argocd cert add-ssh --batch

Or add the lines to argocd-ssh-known-hosts-cm declaratively. Do not set insecure: true in production.

Prevent → Manage known hosts in Git with the rest of the Argo CD config and update them when the host rotates keys.

All GitOps & Argo CD questions Roadmap: Argo CD (GitOps)

More on Repos, Clusters, Projects & Permissions