If the login session times out, you can use the `relogin` command to log in again. When done using the `argocd` commands, you can log out using the `logout` command.
The Red Hat OpenShift GitOps For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope. |
You can log in to the Argo CD server in the default mode using the GitOps argocd
CLI and your Argo CD credentials to execute commands.
After you install and configure the GitOps argocd
CLI, you must log in to the Argo CD server to execute commands in the default mode.
You must have the GitOps argocd
CLI tool installed and configured.
You must use your credentials to log in and remain logged in throughout the session.
If the login session times out, you can use the `relogin` command to log in again. When done using the `argocd` commands, you can log out using the `logout` command. |
Get the admin
account password for the Argo CD server:
$ ADMIN_PASSWD=$(oc get secret openshift-gitops-cluster -n openshift-gitops -o jsonpath='{.data.admin\.password}' | base64 -d)
Get the Argo CD server URL:
$ SERVER_URL=$(oc get routes openshift-gitops-server -n openshift-gitops -o jsonpath='{.status.ingress[0].host}')
Log in to the Argo CD server by using the admin
account password and enclosing it in single quotes:
Enclosing the password in single quotes ensures that special characters, such as |
$ argocd login --username admin --password ${ADMIN_PASSWD} ${SERVER_URL}
$ argocd login --username admin --password '<password>' openshift-gitops.openshift-gitops.apps-crc.testing
After a successful login, the session context will be displayed as follows:
'admin:login' logged in successfully
Context '<server_url>' updated