All Products
Search
Document Center

Container Service for Kubernetes:Repository management

Last Updated:Oct 18, 2025

This topic describes how to add, view, and delete Git source repositories and Helm source repositories in a GitOps system using the Argo CD command-line interface (CLI) and the Argo CD console.

Prerequisites

You are logged on to the GitOps system. For more information, see Log on to the GitOps system.

Add repositories

Add a Git source repository

You can add a Git source repository using one of the following methods.

  • Add the Git source repository of the sample application to the GitOps system.

    argocd repo add https://github.com/AliyunContainerService/gitops-demo.git

    Expected output:

    Repository 'https://github.com/AliyunContainerService/gitops-demo.git' added
  • Add a private Git source repository over HTTPS using a username and password.

    argocd repo add https://git.example.com/repos/repo --username git --password secret
  • Add a Git source repository over the Secure Shell (SSH) protocol using a private key and ignore server certificate verification.

    argocd repo add git@git.example.com:repos/repo --insecure-ignore-host-key --ssh-private-key-path ~/id_rsa

Run the following command to view usage instructions for additional parameters.

argocd repo add --help

Add a Helm source repository

You can add a Helm source repository using one of the following methods.

  • Add a public Helm repository over HTTPS and assign it a name.

    argocd repo add https://charts.helm.sh/stable --type helm --name <local-repository-name>
  • Add a private Helm repository over HTTPS using a username and password, and assign it a name.

    argocd repo add https://charts.helm.sh/stable --type helm --name <local-repository-name> --username test --password test

    If you use a Helm chart from an Alibaba Cloud Container Registry (ACR) Enterprise Edition instance, specify the full repository path.

    argocd repo add https://<instance-name>-chart.<region-id>.cr.aliyuncs.com/<namespace>/<chart-repository> --type helm --name <local-repository-name> --username test --password test
  • Add a private OCI-based Helm repository over HTTPS and assign it a name.

    argocd repo add helm-oci-registry.cn-zhangjiakou.cr.aliyuncs.com --type helm --name <local-repository-name> --enable-oci --username test --password test

View the repository list

Run the following command to view the repository list.

argocd repo list

Expected output:

TYPE  NAME      REPO                                                       INSECURE  OCI    LFS    CREDS  STATUS      MESSAGE  PROJECT
helm  mystable  https://charts.helm.sh/stable                              false     false  false  false  Successful           
git             https://github.com/AliyunContainerService/gitops-demo.git  true      false  false  false  Successful           default

Delete a repository

Run the following command to delete a Git source repository. To delete a Helm repository, replace the Git repository address in the command with the Helm repository address.

argocd repo rm https://github.com/AliyunContainerService/gitops-demo.git

Expected output:

Repository 'https://github.com/AliyunContainerService/gitops-demo.git' removed

Related operations

In addition to using the Argo CD CLI, you can also manage source repositories in the Argo CD console.

Log on to the Argo CD UI. In the navigation pane on the left, choose Settings, and then choose Repositories > + Connect Repo.