You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/rosa-configure.adoc
+43-1
Original file line number
Diff line number
Diff line change
@@ -10,8 +10,50 @@ Use the following commands to configure the {product-title} (ROSA) CLI, `rosa`.
10
10
11
11
[id="rosa-login_{context}"]
12
12
== login
13
+
There are several methods you can use to log into your Red{nbsp}Hat account using the {product-title} (ROSA) CLI (`rosa`).These methods are described in detail below.
13
14
14
-
Log in to your Red{nbsp}Hat account, saving the credentials to the `rosa` configuration file. You must provide a token when logging in. You can copy your token from link:https://console.redhat.com/openshift/token/rosa[the ROSA token page].
15
+
[IMPORTANT]
16
+
====
17
+
Red{nbsp}Hat recommends using the single sign-on method when logging into your account with the ROSA CLI (`rosa`). This method is more secure than logging in with an offline token.
18
+
====
19
+
20
+
21
+
[id="rosa-login-sso_{context}"]
22
+
=== login with single sign-on (SSO) authorization code
23
+
If your system supports a web-based browser, you can log in to the ROSA CLI (`rosa`) with a Red{nbsp}Hat single sign-on (SSO) authorization code.
24
+
25
+
. To log into the ROSA CLI (`rosa`) with a Red{nbsp}Hat single sign-on authorization code, run the following command:
26
+
27
+
+
28
+
[source,terminal]
29
+
----
30
+
$ rosa login --use-auth-code
31
+
----
32
+
+
33
+
Running this command will redirect you to the Red Hat SSO login.
34
+
+
35
+
To switch accounts, logout from link:https://sso.redhat.com[https://sso.redhat.com] and run the command `$ rosa logout` before attempting to login again.
36
+
37
+
[id="rosa-login-sso-device_{context}"]
38
+
=== login with a single sign-on device code
39
+
If you are working with containers, remote hosts, and other environments without a web browser, you can use a Red Hat single sign-on (SSO) device code for secure authentication. To do this, you use second device that has have a web browser to approve the login.
40
+
41
+
. To log in to ROSA CLI (`rosa`) with a Red Hat single sign-on device code, run the following command:
42
+
43
+
+
44
+
[source,terminal]
45
+
----
46
+
$ rosa login --use-device-code
47
+
----
48
+
Running this command will redirect you to the Red Hat SSO login and provide a log in code.
49
+
50
+
To switch accounts, logout from link:https://sso.redhat.com[https://sso.redhat.com] and run `rosa logout` before attempting to login again.
51
+
52
+
53
+
[id="rosa-login-token_{context}"]
54
+
=== login with an offline token
55
+
56
+
Log in to your Red{nbsp}Hat account, saving the credentials to the `rosa` configuration file. You can copy your token from link:https://console.redhat.com/openshift/token/rosa[the ROSA token page].
15
57
16
58
The ROSA CLI (`rosa`) looks for a token in the following priority order:
0 commit comments