Log in to Tanzu Platform hub interactively via browser and create a CLI context with context type tanzu
.
For how interactive login works, see Logging into Tanzu Application Platform in the Tanzu CLI repository.
NoteIn previous versions of the Tanzu CLI, the
tanzu login
command was deprecated in favor oftanzu context
. Thetanzu login
command is no longer deprecated and is now used to log in to Tanzu Application Platform SaaS, as described in Create and manage Tanzu CLI contexts.
System command: login
| Primarily used for: Platform operations, App development
Syntax:
tanzu login [FLAGS]
login, lo, logins
--endpoint string endpoint to login to (default "https://api.tanzu.cloud.vmware.com")
--endpoint-ca-certificate string path to the endpoint public certificate
-h, --help help for login
--insecure-skip-tls-verify skip endpoint's TLS certificate verification
TANZU_API_TOKEN
(Optional): Sets the token to use for login. If not set, CLI logs in interactively.TANZU_CLI_CLOUD_SERVICES_ORGANIZATION_ID
(Optional): Set to an Organization ID to specify the Cloud Services Organization to log in to. If not set, CLI logs in to user’s default Cloud Services Organization.
Examples:
# Login to Tanzu
tanzu login
# Login to Tanzu using non-default endpoint
tanzu login --endpoint "https://login.example.com"
# Login to Tanzu by using the provided CA Bundle for TLS verification:
tanzu login --endpoint https://test.example.com[:port] --endpoint-ca-certificate /path/to/ca/ca-cert
# Login to Tanzu by explicit request to skip TLS verification (this is insecure)::
tanzu login --endpoint https://test.example.com[:port] --insecure-skip-tls-verify