update intro and how to use tokens (#18458)

This commit is contained in:
Stephanie Aurelio 2023-10-18 08:53:34 -07:00 committed by GitHub
parent 33c0e3d2ce
commit 7526256c4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 7 deletions

View File

@ -7,8 +7,7 @@ aliases:
- /docker-hub/access-tokens/
---
If you are using the [Docker Hub CLI](https://github.com/docker/hub-tool#readme)
tool (currently experimental) to access Hub images from the Docker CLI, you can create personal access tokens (PAT) as alternatives to your password.
You can create personal access tokens (PAT) to use as alternatives to your password for Docker CLI authentication.
Compared to passwords, personal access tokens provide the following advantages:
@ -49,12 +48,15 @@ any time.
## Use an access token
You can use an access token anywhere that requires your Docker Hub
password.
You can use an access token in place of your password when you log in using Docker CLI.
When logging in from your Docker CLI client (`docker login --username <username>`),
omit the password in the login command. Instead, enter your token when asked for
a password.
Log in from your Docker CLI client with the following command, replacing `YOUR_USERNAME` with your Docker ID:
```console
$ docker login --username <YOUR_USERNAME>
```
When prompted for a password, enter your personal access token instead of a password.
> **Note**
>