Bug 1502534 - docs about `oc login` should recommend Help -> Command Line Tools
Summary: docs about `oc login` should recommend Help -> Command Line Tools
Keywords:
Status: NEW
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Documentation
Version: 3.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-16 07:54 UTC by Beni Paskin-Cherniavsky
Modified: 2023-05-15 19:01 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Beni Paskin-Cherniavsky 2017-10-16 07:54:41 UTC
Document URL: https://docs.openshift.com/online/cli_reference/get_started_cli.html

Section Number and Name: Basic Setup and Login

Describe the issue: 
That section doesn't answer 2 questions critical to actually using `oc login`:

 1. server url — example says https://openshift.example.com; the real answer https://api.starter-us-east-1.openshift.com:443 is not something one could guess and depends on which plan/region of Online one uses.

 2. credentials — since Online allows easy signup with Github etc., one may not even know what username/password they have!

Suggestions for improvement: 
I had to look it up on https://stackoverflow.com/q/39961149, turns out you can get command line, including working --token from UI: (?) icon in the top bar -> Command Line Tools.
This is perfect [*]!
I'm signed up with Github and it worked for me :-)

I suppose same recommendation would be useful in corresponding OCP doc as well...

[*] OK, it's not enough as answer, as it uses web session token.  Once I logout from the browser, the CLI stops working.  It's valid use case to want long-lived CLI auth, so the Openshift Online docs should still explain how to obtain username & password if you signed up with Github or similar...


There are other places in docs that mention `oc login` without detail how exactly.  Specifically
https://docs.openshift.com/online/dev_guide/managing_images.html#accessing-the-internal-registry
just says to run `oc login`, with no options nor any explanation...
(I've already logged in to other OCP in the past, so for me bare `oc login` offered re-logging in to same server, useless.)


Note You need to log in before you can comment on or make changes to this bug.