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: README.EN.MD
+66Lines changed: 66 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -307,6 +307,72 @@ After logout, run `ve sso login` to keep using the same account and role. Run `v
307
307
- What should I enter for Scopes?
308
308
Usually nothing. The default is `cloudidentity:account:access,offline_access`. If you enter scopes manually, only `cloudidentity:account:access` and `offline_access` are allowed; the CLI deduplicates and validates them.
309
309
310
+
#### Console Login (login)
311
+
312
+
```shell
313
+
# Sign in with the default profile. If region is omitted, the CLI prompts for it
314
+
ve login
315
+
316
+
# Recommended: specify profile and region; profile/region support -p/-r
317
+
ve login -p dev -r cn-beijing
318
+
319
+
# Use cross-device login for headless, remote-server, or container environments
320
+
ve login -p dev -r cn-beijing --remote
321
+
```
322
+
323
+
This command signs in through the Volcengine Console using OAuth 2.0 + PKCE, caches temporary STS credentials locally, and lets later service commands reuse the temporary credentials from that profile.
324
+
325
+
Parameters:
326
+
- `--profile, -p`: configuration profile name; defaults to `default`
327
+
- `--region, -r`: region; when omitted, the CLI prompts for it and uses `cn-beijing`if you press Enter
328
+
- `--remote`: cross-device login; open the URL printed by the CLI in a browser, finish login, and paste the full authorization code shown in the browser back into the terminal
329
+
- `--endpoint-url`: sign-in service endpoint; defaults to `https://signin.volcengine.com` and normally does not need to be changed
330
+
331
+
Notes:
332
+
- After login, the profile is written with `mode`set to `console-login` and a `login-session`
333
+
- After logging in with a non-`default` profile, service commands do not automatically switch profiles; run `ve configure profile --profile dev` first
334
+
- Use `--remote` when the browser cannot redirect back to the machine running the CLI
335
+
336
+
End-to-end example:
337
+
338
+
```shell
339
+
# 1. Sign in and write the dev profile
340
+
ve login --profile dev --region cn-beijing
341
+
342
+
# 2. If dev is not the current default profile, switch the active profile first
343
+
ve configure profile --profile dev
344
+
345
+
# 3. Service commands use the console-login temporary credentials from the current profile
346
+
ve ecs DescribeInstances
347
+
348
+
# 4. When finished, clear the local login state
349
+
ve logout --profile dev
350
+
```
351
+
352
+
#### Console Logout (logout)
353
+
354
+
```shell
355
+
# Log out the default profile
356
+
ve logout
357
+
358
+
# Log out a specific profile
359
+
ve logout -p dev
360
+
361
+
# Log out all Console Login profiles in the current configuration
362
+
ve logout --all
363
+
```
364
+
365
+
This command clears the local login state created by `ve login`. It removes locally cached credentials and clears the profile's `login-session`; it does not delete the profile or send a logout request to the server.
366
+
367
+
Parameters:
368
+
- `--profile, -p`: configuration profile name; defaults to `default`
369
+
- `--all`: clear all `console-login` profiles in the current configuration; ignores `--profile`
370
+
371
+
Notes:
372
+
- `ve logout` without `--profile` only handles the `default` profile; it does not automatically log out `current`
373
+
- This command only applies to `console-login` profiles; AK/SSO profiles are not affected
374
+
- Run `ve login` again when you need to use Console Login credentials after logout
375
+
310
376
#### Configure Auto-Completion
311
377
312
378
By executing ve completion --help, users can view the methods for configuring auto-completion in various terminals. Based on the instructions provided, users may choose whether to configure the auto-completion feature.
0 commit comments