Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot log into ocp cluster with oc 4.7 client without the username (oc login vs oc login --username) #817

Closed
andreaskaris opened this issue May 3, 2021 · 0 comments · Fixed by #834

Comments

@andreaskaris
Copy link

oc login states You must obtain an API token since Red Hat OpenShift Container Platform 4.7

4.6 client:

[quicklab@upi-0 ~]$ oc login --server=https://(...):6443 --insecure-skip-tls-verify=true
Authentication required for https://api.(...):6443 (openshift)
Username: ^C

4.7 client:

[quicklab@upi-0 ~]$ oc login --server=https://(...):6443 --insecure-skip-tls-verify=true
You must obtain an API token by visiting https://oauth-openshift.apps.(...)/oauth/token/request

Did we make this change on purpose? It looks like it from #553
If so, this is really confusing to our customer base. Also, our documentation is out of date atm:
https://docs.openshift.com/container-platform/4.7/cli_reference/openshift_cli/getting-started-cli.html#cli-installing-cli_cli-developer-commands

If we really must change the oc CLI behavior (and likely there is a good reason for this change) and if we cannot default back to the old, well-known behavior, we should at least provide a Note/Warning to users for the next few versions such as:

[root@openshift-jumpserver-0 ~]# oc login
You must obtain an API token by visiting https://oauth-openshift.apps.ipi-cluster.example.com/oauth/token/request
INFO: The behavior of `oc login` changed.
INFO: If you wish to login via username and password prompt, provide the --username <username> parameter

So that we spare our customers the step to open our documentation? We also have to update our documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant