github.com/argoproj/argo-cd/v3@v3.2.1/docs/user-guide/commands/argocd_repocreds_add.md (about) 1 # `argocd repocreds add` Command Reference 2 3 ## argocd repocreds add 4 5 Add git repository connection parameters 6 7 ``` 8 argocd repocreds add REPOURL [flags] 9 ``` 10 11 ### Examples 12 13 ``` 14 # Add credentials with user/pass authentication to use for all repositories under https://git.example.com/repos 15 argocd repocreds add https://git.example.com/repos/ --username git --password secret 16 17 # Add credentials with bearer token authentication to use for all BitBucket Data Center repositories under https://bitbucket.example.com/scm 18 argocd repocreds add https://bitbucket.example.com/scm/ --bearer-token secret-token 19 20 # Add credentials with SSH private key authentication to use for all repositories under ssh://git@git.example.com/repos 21 argocd repocreds add ssh://git@git.example.com/repos/ --ssh-private-key-path ~/.ssh/id_rsa 22 23 # Add credentials with GitHub App authentication to use for all repositories under https://github.com/repos 24 argocd repocreds add https://github.com/repos/ --github-app-id 1 --github-app-installation-id 2 --github-app-private-key-path test.private-key.pem 25 26 # Add credentials with GitHub App authentication to use for all repositories under https://ghe.example.com/repos 27 argocd repocreds add https://ghe.example.com/repos/ --github-app-id 1 --github-app-installation-id 2 --github-app-private-key-path test.private-key.pem --github-app-enterprise-base-url https://ghe.example.com/api/v3 28 29 # Add credentials with helm oci registry so that these oci registry urls do not need to be added as repos individually. 30 argocd repocreds add localhost:5000/myrepo --enable-oci --type helm 31 32 # Add credentials with GCP credentials for all repositories under https://source.developers.google.com/p/my-google-cloud-project/r/ 33 argocd repocreds add https://source.developers.google.com/p/my-google-cloud-project/r/ --gcp-service-account-key-path service-account-key.json 34 35 ``` 36 37 ### Options 38 39 ``` 40 --bearer-token string bearer token to the Git repository 41 --enable-oci Specifies whether helm-oci support should be enabled for this repo 42 --force-http-basic-auth whether to force basic auth when connecting via HTTP 43 --gcp-service-account-key-path string service account key for the Google Cloud Platform 44 --github-app-enterprise-base-url string base url to use when using GitHub Enterprise (e.g. https://ghe.example.com/api/v3 45 --github-app-id int id of the GitHub Application 46 --github-app-installation-id int installation id of the GitHub Application 47 --github-app-private-key-path string private key of the GitHub Application 48 -h, --help help for add 49 --password string password to the repository 50 --proxy-url string If provided, this URL will be used to connect via proxy 51 --ssh-private-key-path string path to the private ssh key (e.g. ~/.ssh/id_rsa) 52 --tls-client-cert-key-path string path to the TLS client cert's key (must be PEM format) 53 --tls-client-cert-path string path to the TLS client cert (must be PEM format) 54 --type string type of the repository, "git" or "helm" (default "git") 55 --upsert Override an existing repository with the same name even if the spec differs 56 --use-azure-workload-identity whether to use azure workload identity for authentication 57 --username string username to the repository 58 ``` 59 60 ### Options inherited from parent commands 61 62 ``` 63 --argocd-context string The name of the Argo-CD server context to use 64 --auth-token string Authentication token; set this or the ARGOCD_AUTH_TOKEN environment variable 65 --client-crt string Client certificate file 66 --client-crt-key string Client certificate key file 67 --config string Path to Argo CD config (default "/home/user/.config/argocd/config") 68 --controller-name string Name of the Argo CD Application controller; set this or the ARGOCD_APPLICATION_CONTROLLER_NAME environment variable when the controller's name label differs from the default, for example when installing via the Helm chart (default "argocd-application-controller") 69 --core If set to true then CLI talks directly to Kubernetes instead of talking to Argo CD API server 70 --grpc-web Enables gRPC-web protocol. Useful if Argo CD server is behind proxy which does not support HTTP2. 71 --grpc-web-root-path string Enables gRPC-web protocol. Useful if Argo CD server is behind proxy which does not support HTTP2. Set web root. 72 -H, --header strings Sets additional header to all requests made by Argo CD CLI. (Can be repeated multiple times to add multiple headers, also supports comma separated headers) 73 --http-retry-max int Maximum number of retries to establish http connection to Argo CD server 74 --insecure Skip server certificate and domain verification 75 --kube-context string Directs the command to the given kube-context 76 --logformat string Set the logging format. One of: json|text (default "json") 77 --loglevel string Set the logging level. One of: debug|info|warn|error (default "info") 78 --plaintext Disable TLS 79 --port-forward Connect to a random argocd-server port using port forwarding 80 --port-forward-namespace string Namespace name which should be used for port forwarding 81 --prompts-enabled Force optional interactive prompts to be enabled or disabled, overriding local configuration. If not specified, the local configuration value will be used, which is false by default. 82 --redis-compress string Enable this if the application controller is configured with redis compression enabled. (possible values: gzip, none) (default "gzip") 83 --redis-haproxy-name string Name of the Redis HA Proxy; set this or the ARGOCD_REDIS_HAPROXY_NAME environment variable when the HA Proxy's name label differs from the default, for example when installing via the Helm chart (default "argocd-redis-ha-haproxy") 84 --redis-name string Name of the Redis deployment; set this or the ARGOCD_REDIS_NAME environment variable when the Redis's name label differs from the default, for example when installing via the Helm chart (default "argocd-redis") 85 --repo-server-name string Name of the Argo CD Repo server; set this or the ARGOCD_REPO_SERVER_NAME environment variable when the server's name label differs from the default, for example when installing via the Helm chart (default "argocd-repo-server") 86 --server string Argo CD server address 87 --server-crt string Server certificate file 88 --server-name string Name of the Argo CD API server; set this or the ARGOCD_SERVER_NAME environment variable when the server's name label differs from the default, for example when installing via the Helm chart (default "argocd-server") 89 ``` 90 91 ### SEE ALSO 92 93 * [argocd repocreds](argocd_repocreds.md) - Manage credential templates for repositories 94