Overview
The Repository Service API manages repository configurations for Git and Helm repositories. Repositories are the source of application manifests and must be registered with Argo CD. Base Path:/api/v1/repositories
gRPC Service: repository.RepositoryService
Repository Resource
A Repository represents a Git or Helm repository containing application manifests.Repository Spec
Repository URL
Repository type: “git” (default), “helm”, or “oci”
Repository name (required for Helm repos)
Project that owns this repository
Authentication Fields
Username for HTTPS authentication
Password or personal access token
SSH private key (PEM format) for Git repos
Bearer token for Git authentication (BitBucket Data Center)
TLS client certificate (PEM format)
TLS client certificate key (PEM format)
GitHub App Authentication
GitHub App private key (PEM format)
GitHub App ID
GitHub App installation ID
GitHub Enterprise API URL (default: https://api.github.com)
Cloud Provider Authentication
GCP service account key (JSON format) for Google Cloud Source repos
Use Azure Workload Identity for authentication
Additional Options
Skip TLS certificate or SSH host key validation
Enable Git LFS support (Git repos only)
Enable OCI support for Helm repos
HTTP/HTTPS proxy URL
Force HTTP basic authentication
Use HTTP instead of HTTPS for OCI repos
Git shallow clone depth (0 = full clone)
Example Repository
API Operations
List Repositories
Retrieve list of configured repositories.Filter by repository URL
Force refresh connection state
Filter by project
Get Repository
Retrieve a specific repository.Repository URL (URL-encoded)
Force refresh connection state
Project context
Create Repository
Register a new repository.Complete Repository configuration
Update if already exists (default: false)
Create as credential template instead of repository
Update Repository
Update repository configuration.Repository URL (URL-encoded)
Updated repository configuration
Delete Repository
Remove a repository.Repository URL (URL-encoded)
Repository Operations
Validate Access
Test repository connectivity and credentials.Repository URL (URL-encoded)
Provide all authentication fields for validation
List Repository Apps
Discover applications in a repository.Repository URL (URL-encoded)
Git revision (default: HEAD)
Application name context
Project context
Get App Details
Get detailed information about an application in the repository.Application source configuration
Application name
Project name
List Helm Charts
List available Helm charts in a Helm repository.Repository URL (URL-encoded)
List Refs
List Git branches and tags.Repository URL (URL-encoded)
List OCI Tags
List available tags in an OCI repository.Write Repositories
Separate read and write repositories for source hydration workflows.List Write Repositories
Get Write Repository
Create Write Repository
Update Write Repository
Delete Write Repository
Authentication Examples
GitHub Personal Access Token
GitHub App
GitLab Token
SSH Key
Helm with Basic Auth
Google Cloud Source Repositories
Connection State
Repositories report their connection status:Successful: Repository is accessibleFailed: Connection or authentication failedUnknown: Status not yet determined
Repository Credentials
Credential templates can be shared across multiple repositories.Create Credential Template
Security Best Practices
Use Fine-Grained Tokens
Use Fine-Grained Tokens
Use repository-scoped tokens with minimal permissions:
- GitHub: Use fine-grained PATs with read-only repo access
- GitLab: Use project access tokens
- Bitbucket: Use repository access tokens
Enable TLS Verification
Enable TLS Verification
Always verify TLS certificates in production:
Use SSH for Private Repos
Use SSH for Private Repos
SSH keys are generally more secure than HTTPS tokens for Git.
Rotate Credentials
Rotate Credentials
Regularly rotate repository credentials and tokens.
Use Credential Templates
Use Credential Templates
Share credentials across repositories to reduce duplication.
Next Steps
Application API
Create applications from repositories
Project API
Configure allowed repositories