From 3484a10217b6c8ff3d68412b8d417a3c64331312 Mon Sep 17 00:00:00 2001 From: Cheng Fang Date: Thu, 12 Jun 2025 15:22:18 -0400 Subject: [PATCH] chore(cli): fix `argocd admin repo` command usage docs and examples Signed-off-by: Cheng Fang --- cmd/argocd/commands/admin/repo.go | 6 +++--- cmd/argocd/commands/repocreds.go | 2 +- cmd/util/repo.go | 2 +- .../commands/argocd_admin_repo_generate-spec.md | 8 ++++---- docs/user-guide/commands/argocd_repo_add.md | 2 +- docs/user-guide/commands/argocd_repocreds_add.md | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cmd/argocd/commands/admin/repo.go b/cmd/argocd/commands/admin/repo.go index 43fbe76251bac..e02ae6fcd2b56 100644 --- a/cmd/argocd/commands/admin/repo.go +++ b/cmd/argocd/commands/admin/repo.go @@ -70,13 +70,13 @@ func NewGenRepoSpecCommand() *cobra.Command { argocd admin repo generate-spec helm-oci-registry.cn-zhangjiakou.cr.aliyuncs.com --type helm --name stable --enable-oci --username test --password test # Add a private HTTPS OCI repository named 'stable' - argocd repo generate-spec oci://helm-oci-registry.cn-zhangjiakou.cr.aliyuncs.com --type oci --name stable --username test --password test + argocd admin repo generate-spec oci://helm-oci-registry.cn-zhangjiakou.cr.aliyuncs.com --type oci --name stable --username test --password test # Add a private OCI repository named 'stable' without verifying the server's TLS certificate - argocd repo generate-spec oci://helm-oci-registry.cn-zhangjiakou.cr.aliyuncs.com --type oci --name stable --username test --password test --insecure-skip-server-verification + argocd admin repo generate-spec oci://helm-oci-registry.cn-zhangjiakou.cr.aliyuncs.com --type oci --name stable --username test --password test --insecure-skip-server-verification # Add a private HTTP OCI repository named 'stable' - argocd repo generate-spec oci://helm-oci-registry.cn-zhangjiakou.cr.aliyuncs.com --type oci --name stable --username test --password test --insecure-oci-force-http + argocd admin repo generate-spec oci://helm-oci-registry.cn-zhangjiakou.cr.aliyuncs.com --type oci --name stable --username test --password test --insecure-oci-force-http ` command := &cobra.Command{ diff --git a/cmd/argocd/commands/repocreds.go b/cmd/argocd/commands/repocreds.go index 835009d2bd41c..778b5be008349 100644 --- a/cmd/argocd/commands/repocreds.go +++ b/cmd/argocd/commands/repocreds.go @@ -189,7 +189,7 @@ func NewRepoCredsAddCommand(clientOpts *argocdclient.ClientOptions) *cobra.Comma command.Flags().StringVar(&repo.BearerToken, "bearer-token", "", "bearer token to the Git repository") command.Flags().StringVar(&sshPrivateKeyPath, "ssh-private-key-path", "", "path to the private ssh key (e.g. ~/.ssh/id_rsa)") command.Flags().StringVar(&tlsClientCertPath, "tls-client-cert-path", "", "path to the TLS client cert (must be PEM format)") - command.Flags().StringVar(&tlsClientCertKeyPath, "tls-client-cert-key-path", "", "path to the TLS client cert's key path (must be PEM format)") + command.Flags().StringVar(&tlsClientCertKeyPath, "tls-client-cert-key-path", "", "path to the TLS client cert's key (must be PEM format)") command.Flags().Int64Var(&repo.GithubAppId, "github-app-id", 0, "id of the GitHub Application") command.Flags().Int64Var(&repo.GithubAppInstallationId, "github-app-installation-id", 0, "installation id of the GitHub Application") command.Flags().StringVar(&githubAppPrivateKeyPath, "github-app-private-key-path", "", "private key of the GitHub Application") diff --git a/cmd/util/repo.go b/cmd/util/repo.go index 15fe8aefe448c..10637b8602395 100644 --- a/cmd/util/repo.go +++ b/cmd/util/repo.go @@ -38,7 +38,7 @@ func AddRepoFlags(command *cobra.Command, opts *RepoOptions) { command.Flags().StringVar(&opts.Repo.BearerToken, "bearer-token", "", "bearer token to the Git BitBucket Data Center repository") command.Flags().StringVar(&opts.SshPrivateKeyPath, "ssh-private-key-path", "", "path to the private ssh key (e.g. ~/.ssh/id_rsa)") command.Flags().StringVar(&opts.TlsClientCertPath, "tls-client-cert-path", "", "path to the TLS client cert (must be PEM format)") - command.Flags().StringVar(&opts.TlsClientCertKeyPath, "tls-client-cert-key-path", "", "path to the TLS client cert's key path (must be PEM format)") + command.Flags().StringVar(&opts.TlsClientCertKeyPath, "tls-client-cert-key-path", "", "path to the TLS client cert's key (must be PEM format)") command.Flags().BoolVar(&opts.InsecureIgnoreHostKey, "insecure-ignore-host-key", false, "disables SSH strict host key checking (deprecated, use --insecure-skip-server-verification instead)") command.Flags().BoolVar(&opts.InsecureSkipServerVerification, "insecure-skip-server-verification", false, "disables server certificate and host key checks") command.Flags().BoolVar(&opts.EnableLfs, "enable-lfs", false, "enable git-lfs (Large File Support) on this repository") diff --git a/docs/user-guide/commands/argocd_admin_repo_generate-spec.md b/docs/user-guide/commands/argocd_admin_repo_generate-spec.md index ffd5a7bac26c4..f9a26090b60c4 100644 --- a/docs/user-guide/commands/argocd_admin_repo_generate-spec.md +++ b/docs/user-guide/commands/argocd_admin_repo_generate-spec.md @@ -37,13 +37,13 @@ argocd admin repo generate-spec REPOURL [flags] argocd admin repo generate-spec helm-oci-registry.cn-zhangjiakou.cr.aliyuncs.com --type helm --name stable --enable-oci --username test --password test # Add a private HTTPS OCI repository named 'stable' - argocd repo generate-spec oci://helm-oci-registry.cn-zhangjiakou.cr.aliyuncs.com --type oci --name stable --username test --password test + argocd admin repo generate-spec oci://helm-oci-registry.cn-zhangjiakou.cr.aliyuncs.com --type oci --name stable --username test --password test # Add a private OCI repository named 'stable' without verifying the server's TLS certificate - argocd repo generate-spec oci://helm-oci-registry.cn-zhangjiakou.cr.aliyuncs.com --type oci --name stable --username test --password test --insecure-skip-server-verification + argocd admin repo generate-spec oci://helm-oci-registry.cn-zhangjiakou.cr.aliyuncs.com --type oci --name stable --username test --password test --insecure-skip-server-verification # Add a private HTTP OCI repository named 'stable' - argocd repo generate-spec oci://helm-oci-registry.cn-zhangjiakou.cr.aliyuncs.com --type oci --name stable --username test --password test --insecure-oci-force-http + argocd admin repo generate-spec oci://helm-oci-registry.cn-zhangjiakou.cr.aliyuncs.com --type oci --name stable --username test --password test --insecure-oci-force-http ``` @@ -70,7 +70,7 @@ argocd admin repo generate-spec REPOURL [flags] --project string project of the repository --proxy string use proxy to access repository --ssh-private-key-path string path to the private ssh key (e.g. ~/.ssh/id_rsa) - --tls-client-cert-key-path string path to the TLS client cert's key path (must be PEM format) + --tls-client-cert-key-path string path to the TLS client cert's key (must be PEM format) --tls-client-cert-path string path to the TLS client cert (must be PEM format) --type string type of the repository, "git", "oci" or "helm" (default "git") --use-azure-workload-identity whether to use azure workload identity for authentication diff --git a/docs/user-guide/commands/argocd_repo_add.md b/docs/user-guide/commands/argocd_repo_add.md index 16e2c532521e2..6def99e5ce9a3 100644 --- a/docs/user-guide/commands/argocd_repo_add.md +++ b/docs/user-guide/commands/argocd_repo_add.md @@ -80,7 +80,7 @@ argocd repo add REPOURL [flags] --project string project of the repository --proxy string use proxy to access repository --ssh-private-key-path string path to the private ssh key (e.g. ~/.ssh/id_rsa) - --tls-client-cert-key-path string path to the TLS client cert's key path (must be PEM format) + --tls-client-cert-key-path string path to the TLS client cert's key (must be PEM format) --tls-client-cert-path string path to the TLS client cert (must be PEM format) --type string type of the repository, "git", "oci" or "helm" (default "git") --upsert Override an existing repository with the same name even if the spec differs diff --git a/docs/user-guide/commands/argocd_repocreds_add.md b/docs/user-guide/commands/argocd_repocreds_add.md index 033f6de091182..5fcc0fa61487a 100644 --- a/docs/user-guide/commands/argocd_repocreds_add.md +++ b/docs/user-guide/commands/argocd_repocreds_add.md @@ -49,7 +49,7 @@ argocd repocreds add REPOURL [flags] --password string password to the repository --proxy-url string If provided, this URL will be used to connect via proxy --ssh-private-key-path string path to the private ssh key (e.g. ~/.ssh/id_rsa) - --tls-client-cert-key-path string path to the TLS client cert's key path (must be PEM format) + --tls-client-cert-key-path string path to the TLS client cert's key (must be PEM format) --tls-client-cert-path string path to the TLS client cert (must be PEM format) --type string type of the repository, "git" or "helm" (default "git") --upsert Override an existing repository with the same name even if the spec differs