Skip to main content

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
Response:

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
Example:
Response:

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
Response:

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)
Response:

List Refs

List Git branches and tags.
string
required
Repository URL (URL-encoded)
Response:

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:
Status Values:
  • Successful: Repository is accessible
  • Failed: Connection or authentication failed
  • Unknown: Status not yet determined

Repository Credentials

Credential templates can be shared across multiple repositories.

Create Credential Template

Repositories matching the URL prefix will inherit these credentials.

Security Best Practices

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
Always verify TLS certificates in production:
SSH keys are generally more secure than HTTPS tokens for Git.
Regularly rotate repository credentials and tokens.
Share credentials across repositories to reduce duplication.

Next Steps

Application API

Create applications from repositories

Project API

Configure allowed repositories