Description of problem: The `oc login` help show: Options: -p, --password='': Password, will prompt if not provided -u, --username='': Username, will prompt if not provided But now we don't support prompt interactively for the username. need to update the help page. Version-Release number of selected component (if applicable): [zhouying@dhcp-140-138 ~]$ oc version --client Client Version: 4.7.0-0.nightly-2021-01-22-134922 How reproducible: always Steps to Reproduce: 1.`oc help -h` Actual results: [zhouying@dhcp-140-138 ~]$ oc login -h Log in to your server and save login for subsequent use .... Options: -p, --password='': Password, will prompt if not provided -u, --username='': Username, will prompt if not provided Expected results: Delete the prompt info for username, since we don't support prompt interactively for it. Additional info:
Also for the description : The information required to login -- like username and password, a session token, or the server details -- can be provided through flags. If not provided, the command will prompt for user input as needed.
(In reply to zhou ying from comment #1) > Also for the description : > The information required to login -- like username and password, a session > token, or the server details -- can be > provided through flags. If not provided, the command will prompt for user > input as needed. That bit doesn't talk about username or password, and that other will be asked for if not provided with --username flag. We also interactively ask for server URL and inform about certificate, so I'll leave that. I'll change flag descriptions (both username and password) and fix the interactive example to include --username flag
Confirmed with latest oc , the issue has fixed: [root@dhcp-140-138 ~]# oc login -h .... Usage: oc login [URL] [flags] Examples: # Log in interactively oc login --username=myuser # Log in to the given server with the given certificate authority file oc login localhost:8443 --certificate-authority=/path/to/cert.crt # Log in to the given server with the given credentials (will not prompt interactively) oc login localhost:8443 --username=myuser --password=mypass Options: -p, --password='': Password for server -u, --username='': Username for server [root@dhcp-140-138 ~]# oc version --client Client Version: 4.7.0-202101300840.p0-ba6a9bd
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2020:5633