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

Adding a private GitHub repo over HTTPS fails with `rpc error: code = Unknown desc = authentication required`.

BeginnerTroubleshootingRepos, Clusters, Projects & Permissions
Answer

Likely causes → No credentials stored for that URL, an expired or revoked personal access token, a token without repo/contents:read scope, or the repo secret is missing the argocd.argoproj.io/secret-type: repository label.

Diagnose →

argocd repo list
kubectl -n argocd get secrets -l argocd.argoproj.io/secret-type=repository
git ls-remote https://<user>:<token>@github.com/org/config.git   # test the token outside Argo CD

Fix → Re-add the repo with a valid token: argocd repo add https://github.com/org/config.git --username git --password <token> --upsert.

Prevent → Use a GitHub App credential template instead of personal tokens, and alert on repo connection failures.

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

More on Repos, Clusters, Projects & Permissions