github.com/argoproj/argo-cd/v2@v2.10.5/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 SSH private key authentication to use for all repositories under ssh://git@git.example.com/repos 18 argocd repocreds add ssh://git@git.example.com/repos/ --ssh-private-key-path ~/.ssh/id_rsa 19 20 # Add credentials with GitHub App authentication to use for all repositories under https://github.com/repos 21 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 22 23 # Add credentials with GitHub App authentication to use for all repositories under https://ghe.example.com/repos 24 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 25 26 # Add credentials with helm oci registry so that these oci registry urls do not need to be added as repos individually. 27 argocd repocreds add localhost:5000/myrepo --enable-oci --type helm 28 29 # Add credentials with GCP credentials for all repositories under https://source.developers.google.com/p/my-google-cloud-project/r/ 30 argocd repocreds add https://source.developers.google.com/p/my-google-cloud-project/r/ --gcp-service-account-key-path service-account-key.json 31 32 ``` 33 34 ### Options 35 36 ``` 37 --enable-oci Specifies whether helm-oci support should be enabled for this repo 38 --force-http-basic-auth whether to force basic auth when connecting via HTTP 39 --gcp-service-account-key-path string service account key for the Google Cloud Platform 40 --github-app-enterprise-base-url string base url to use when using GitHub Enterprise (e.g. https://ghe.example.com/api/v3 41 --github-app-id int id of the GitHub Application 42 --github-app-installation-id int installation id of the GitHub Application 43 --github-app-private-key-path string private key of the GitHub Application 44 -h, --help help for add 45 --password string password to the repository 46 --ssh-private-key-path string path to the private ssh key (e.g. ~/.ssh/id_rsa) 47 --tls-client-cert-key-path string path to the TLS client cert's key path (must be PEM format) 48 --tls-client-cert-path string path to the TLS client cert (must be PEM format) 49 --type string type of the repository, "git" or "helm" (default "git") 50 --upsert Override an existing repository with the same name even if the spec differs 51 --username string username to the repository 52 ``` 53 54 ### Options inherited from parent commands 55 56 ``` 57 --auth-token string Authentication token 58 --client-crt string Client certificate file 59 --client-crt-key string Client certificate key file 60 --config string Path to Argo CD config (default "/home/user/.config/argocd/config") 61 --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") 62 --core If set to true then CLI talks directly to Kubernetes instead of talking to Argo CD API server 63 --grpc-web Enables gRPC-web protocol. Useful if Argo CD server is behind proxy which does not support HTTP2. 64 --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. 65 -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) 66 --http-retry-max int Maximum number of retries to establish http connection to Argo CD server 67 --insecure Skip server certificate and domain verification 68 --kube-context string Directs the command to the given kube-context 69 --logformat string Set the logging format. One of: text|json (default "text") 70 --loglevel string Set the logging level. One of: debug|info|warn|error (default "info") 71 --plaintext Disable TLS 72 --port-forward Connect to a random argocd-server port using port forwarding 73 --port-forward-namespace string Namespace name which should be used for port forwarding 74 --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") 75 --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") 76 --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") 77 --server string Argo CD server address 78 --server-crt string Server certificate file 79 --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") 80 ``` 81 82 ### SEE ALSO 83 84 * [argocd repocreds](argocd_repocreds.md) - Manage repository connection parameters 85