Wrong token specified for the DHI_API_TOKEN var
Nobody has claimed this yet.
- Dominant language
- Markdown
- Stars
- 4.7k
- Forks
- 8.5k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 108
Description
Is this a docs issue?
- My issue is about the documentation content or website
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>.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at https://docs.docker.com/dhi/tools/cli/ and review the instructions for DHI_API_TOKEN and Docker Hub authentication. Update the documentation so it distinguishes the JWT value required by DHI_API_TOKEN from the Personal Access Token used to obtain it. Done when the page no longer tells users to use a PAT directly and the token flow is accurate.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker
- Domain
- cli, documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100