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
string
required
Repository URL
string
Repository type: “git” (default), “helm”, or “oci”
string
Repository name (required for Helm repos)
string
Project that owns this repository
Authentication Fields
string
Username for HTTPS authentication
string
Password or personal access token
string
SSH private key (PEM format) for Git repos
string
Bearer token for Git authentication (BitBucket Data Center)
string
TLS client certificate (PEM format)
string
TLS client certificate key (PEM format)
GitHub App Authentication
string
GitHub App private key (PEM format)
int64
GitHub App ID
int64
GitHub App installation ID
string
GitHub Enterprise API URL (default: https://api.github.com)
Cloud Provider Authentication
string
GCP service account key (JSON format) for Google Cloud Source repos
boolean
Use Azure Workload Identity for authentication
Additional Options
boolean
Skip TLS certificate or SSH host key validation
boolean
Enable Git LFS support (Git repos only)
boolean
Enable OCI support for Helm repos
string
HTTP/HTTPS proxy URL
boolean
Force HTTP basic authentication
boolean
Use HTTP instead of HTTPS for OCI repos
int64
Git shallow clone depth (0 = full clone)
Example Repository
API Operations
List Repositories
Retrieve list of configured repositories.string
Filter by repository URL
boolean
Force refresh connection state
string
Filter by project
Get Repository
Retrieve a specific repository.string
required
Repository URL (URL-encoded)
boolean
Force refresh connection state
string
Project context
Create Repository
Register a new repository.Repository
required
Complete Repository configuration
boolean
Update if already exists (default: false)
boolean
Create as credential template instead of repository
Update Repository
Update repository configuration.string
required
Repository URL (URL-encoded)
Repository
required
Updated repository configuration
Delete Repository
Remove a repository.string
required
Repository URL (URL-encoded)
Repository Operations
Validate Access
Test repository connectivity and credentials.string
required
Repository URL (URL-encoded)
object
Provide all authentication fields for validation
List Repository Apps
Discover applications in a repository.string
required
Repository URL (URL-encoded)
string
Git revision (default: HEAD)
string
Application name context
string
Project context
Get App Details
Get detailed information about an application in the repository.ApplicationSource
required
Application source configuration
string
Application name
string
Project name
List Helm Charts
List available Helm charts in a Helm repository.string
required
Repository URL (URL-encoded)
List Refs
List Git branches and tags.string
required
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