argocd repo command manages repository connections, allowing Argo CD to access Git repositories, Helm charts, and OCI registries.
Quick Examples
Subcommands
add
Add Git, Helm, or OCI repository connection parameters.- Git via SSH
- Git via HTTPS
- Helm Repository
- OCI Registry
Add a private Git repository using SSH:
string
default:"git"
Repository type:
git, helm, or ocistring
Repository name (required for Helm repositories)
string
Username for authentication
string
Password for authentication
string
Path to SSH private key file
string
Path to TLS client certificate (PEM format)
string
Path to TLS client certificate key (PEM format)
boolean
Disable server certificate and host key checks
boolean
Update repository if it already exists
string
Restrict repository to specific project
Advanced Authentication Options
GitHub App
Authenticate using GitHub App:integer
GitHub Application ID
integer
GitHub App installation ID (optional, auto-discovered if not provided)
string
Path to GitHub App private key file
string
Base URL for GitHub Enterprise API
Google Cloud Source
Authenticate with GCP service account:Proxy Configuration
Add repository with proxy support:Git LFS
Enable Git Large File Storage:list
List all configured repositories.get
Get details about a configured repository.rm
Remove a repository configuration.Repository Credentials (repocreds)
For managing credential templates that apply to multiple repositories, useargocd repocreds:
Add Credential Template
List Credential Templates
Remove Credential Template
Common Workflows
Adding GitHub Private Repository
Adding GitLab Private Repository
Adding Azure DevOps Repository
Adding Bitbucket Repository
Managing Multiple Repositories
Use credential templates for efficiency:Helm Chart Repositories
OCI Registries
Troubleshooting
Test Repository Connection
Authentication Failures
Certificate Issues
SSH Key Issues
Security Best Practices
- Use deploy keys or tokens with minimal required permissions
- For GitHub, use GitHub Apps instead of personal access tokens
- Rotate credentials regularly
- Use credential templates (repocreds) to avoid duplicating secrets
- Never commit credentials to Git repositories
- Use secrets management systems (Vault, etc.) where possible
- Enable Git LFS only when needed to avoid performance issues
- Use TLS certificates for private Git servers
Environment Variables
Repository credentials can also be configured via environment variables:Next Steps
App Commands
Create applications from repositories
Project Commands
Organize repositories by project