Silvin Lubecki
642bb7dbcd
Remove token update command, replaced with token activate and token deactivate commands
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-11-20 18:33:59 +01:00
Djordje Lukic
e19cb23204
Implement `hub-tool account rate-limiting`
...
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2020-11-20 15:39:15 +01:00
Djordje Lukic
0955eb0c95
Store the user password so that we can only ask for the 2fa code when the token expires
...
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2020-11-19 10:51:09 +01:00
Silvin Lubecki
cef93be958
Implement 2FA
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Use credentials helper to store auth configuration
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
Remove useless auth resolver
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
Use docker.Streams instead of the cli
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
Make account info and all PAT commands sudo (require login)
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2020-11-18 18:07:41 +01:00
Chris Crone
df9101957f
Add verbose option and Hub client logging
...
Signed-off-by: Chris Crone <christopher.crone@docker.com>
2020-11-13 10:22:38 +01:00
Chris Crone
f4f7e42eeb
client: Improve error handling
...
Signed-off-by: Chris Crone <christopher.crone@docker.com>
2020-11-12 18:26:25 +01:00
Chris Crone
fd44d266ac
client: Return server message on bad status
...
Signed-off-by: Chris Crone <christopher.crone@docker.com>
2020-11-12 15:51:08 +01:00
Silvin Lubecki
e603ffd985
Merge pull request #108 from docker/fix-docker-api-url-env
...
Fix typo on env vars
2020-11-06 15:12:59 +01:00
Silvin Lubecki
8e77ceb6aa
Fix typo, we should have 2 different env vars: DOCKER_REGISTRY_URL and DOCKER_HUB_API_URL
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-11-06 15:07:43 +01:00
Silvin Lubecki
6d8743ca76
Merge pull request #105 from docker/chore-bump-page-size
...
Bump items per page from 25 to 100
2020-11-06 14:37:00 +01:00
Alex Hokanson
c0bb26e69c
registry-1.docker.io is the canonical registry hostname
...
Signed-off-by: Alex Hokanson <571756+ingshtrom@users.noreply.github.com>
2020-10-28 10:12:31 -04:00
Djordje Lukic
c086e067e8
Bump items per page from 25 to 100
...
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2020-10-28 11:39:26 +01:00
Silvin Lubecki
f21a52b214
Merge pull request #99 from docker/feat-remove-expires
...
Remove the expires column
2020-10-27 11:53:15 +01:00
Djordje Lukic
4a7a735200
Rename `token revoke` to `token rm`
...
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2020-10-27 11:30:11 +01:00
Djordje Lukic
f03b96ea1e
Remove the expires column
...
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2020-10-27 10:57:05 +01:00
Djordje Lukic
83731307d9
Remove error from imports
...
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2020-10-23 16:43:54 +02:00
Djordje Lukic
e31f789c90
Use errgroup
...
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2020-10-23 16:43:54 +02:00
Silvin Lubecki
7011418009
Fix org ls command which takes too much time by adding concurrency when calling the API multiple times
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-23 16:43:54 +02:00
Djordje Lukic
21ed360c78
Pass the context down to http
...
That way we cancel the requests if the users ctrl+c
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2020-10-23 16:43:53 +02:00
Silvin Lubecki
1cba34f369
Show how many listed elements we print with the total, and added a CTA to use --all flag to show all the elements
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-23 16:43:52 +02:00
Silvin Lubecki
70be35782e
Add tokens API CRUD to hub client
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-16 14:14:08 +02:00
Silvin Lubecki
e86b356eff
Rename import path to github.com/docker/hub-tool
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-14 12:06:42 +02:00
Silvin Lubecki
912eb7af8b
Enforce user hub loggin uppon hub-tool use
...
Added e2e test
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-12 09:53:09 +02:00
Silvin Lubecki
e546743507
Big refactor: instanciate the hub client in the main so we can factorize creation logic
...
Also removed dependency on dockerCLI to use only streams
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-09 19:39:01 +02:00
Silvin Lubecki
b97c1f9d0b
Refactor: use context for http requests
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-09 15:50:37 +02:00
Silvin Lubecki
f793e3a22f
Change copyright headers to better fit with the Contributor License Agreement
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-09 10:16:15 +02:00
Silvin Lubecki
6e0634a188
Add a CallToAction when listing the tags, if the user is a free user.
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-08 16:26:14 +02:00
Silvin Lubecki
ee9a9cb0b2
Add custom user-agent for better discrimination on the API side.
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-07 09:37:57 +02:00
Silvin Lubecki
a92d1f624c
Add --sort flag to specify which column (update or name) user want to sort by
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-05 16:50:55 +02:00
Silvin Lubecki
ae4041012e
Refactor: add an Option pattern to the http requests so sender can customize the request
...
- factorize authorization header
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-05 14:30:18 +02:00
Silvin Lubecki
9d9f0e3a05
Use the last update of the status API, now at the tag level for multi arch images
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-01 17:27:15 +02:00
Silvin Lubecki
82f6f53045
Append repository to the tag name in the ls command
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-01 17:12:20 +02:00
Silvin Lubecki
76ef1526c1
Added flag --all to "repo ls" and "tag ls" commands to fetch all the elements from pagination, otherwise it will only the the 25 first elements.
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-10-01 16:43:19 +02:00
Silvin Lubecki
5ad657c7e6
Fix printing the full repo name
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-09-30 16:13:26 +02:00
Silvin Lubecki
759d1e7a70
Use the new status fields in the tag api
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-09-24 11:31:54 +02:00
Silvin Lubecki
b10b40b7d0
Added a command "docker hub org teams" to list the teams inside an organization
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-09-23 19:43:34 +02:00
Silvin Lubecki
1e1addf29d
Add "docker hub org ls" which lists the organizations the user is part of, the number of teams and members
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-09-23 19:19:43 +02:00
Silvin Lubecki
4d9b4398a6
Add an optional argument to "docker hub repo ls" so user can specify an organization instead
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-09-23 17:42:44 +02:00
Silvin Lubecki
c30837ac38
Added "repo rm" command to remove a repository
...
docker hub repo rm user/myrepo
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-09-23 17:16:04 +02:00
Silvin Lubecki
7a44f6a0ff
Add a "repo ls" command to list all the repositories a user can access.
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-09-23 16:57:11 +02:00
Silvin Lubecki
0c6eb4574d
Add rmi command to remove a tag
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-09-23 10:55:13 +02:00
Silvin Lubecki
bd7cdff931
Handle pagination to print all the tags
...
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-09-21 18:37:47 +02:00
Silvin Lubecki
d85e1fdd79
Added a list command which prints all the tags of a repository
...
- missing pagination
- missing manifest lists
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-09-21 10:03:55 +02:00