Is this a docs issue?
Type of issue
Information is incorrect
Description
The last part of the page explains that if you want to use the DHI_API_TOKEN env var, you should generate a token in the docker hub account settings. Which is essentially a Personal access token. And is actually not the type of token that the var needs. The var should specify a JWT token not a PAT token.
Location
https://docs.docker.com/dhi/tools/cli/
Suggestion
To obtain the JWT token, the Personal access token is definitely necessary, you need to go to your docker hub account settings then go to Personal Access Token then generate one PAT with the correct rights you need. Then run this command to auth to the API and obtain the JWT token:
curl -s -X POST https://hub.docker.com/v2/auth/token -H "Content-Type: application/json" -d '{"identifier":"<HUB_USERNAME>","secret":"<PERSONAL_ACCESS_TOKEN"}' | jq -r .access_token
Then export the DHI_API_TOKEN=<JWT_TOKEN>.
Is this a docs issue?
Type of issue
Information is incorrect
Description
The last part of the page explains that if you want to use the DHI_API_TOKEN env var, you should generate a token in the docker hub account settings. Which is essentially a Personal access token. And is actually not the type of token that the var needs. The var should specify a JWT token not a PAT token.
Location
https://docs.docker.com/dhi/tools/cli/
Suggestion
To obtain the JWT token, the Personal access token is definitely necessary, you need to go to your docker hub account settings then go to Personal Access Token then generate one PAT with the correct rights you need. Then run this command to auth to the API and obtain the JWT token:
curl -s -X POST https://hub.docker.com/v2/auth/token -H "Content-Type: application/json" -d '{"identifier":"<HUB_USERNAME>","secret":"<PERSONAL_ACCESS_TOKEN"}' | jq -r .access_token
Then export the DHI_API_TOKEN=<JWT_TOKEN>.