diff --git a/content/security/for-developers/access-tokens.md b/content/security/for-developers/access-tokens.md index 957cd8bc94..8b375500e1 100644 --- a/content/security/for-developers/access-tokens.md +++ b/content/security/for-developers/access-tokens.md @@ -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 `), -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 +``` + +When prompted for a password, enter your personal access token instead of a password. > **Note** >