Граф коммитов

190 Коммитов

Автор SHA1 Сообщение Дата
Silvin Lubecki f62b571ca3 Fix some indentation issues
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-12-16 15:18:24 +01:00
Silvin Lubecki ab04bec530
Merge pull request #145 from docker/alpine-build
Move to Alpine base build image
2020-12-15 16:48:34 +01:00
Chris Crone 97db9e6999 build: Run validate headers in build step
Signed-off-by: Chris Crone <christopher.crone@docker.com>
2020-12-15 15:54:53 +01:00
Chris Crone 2fa5610a91 build: Move to Alpine build image, bump deps
Signed-off-by: Chris Crone <christopher.crone@docker.com>
2020-12-15 15:30:32 +01:00
Silvin Lubecki 456674bff1
Merge pull request #146 from docker/docker-deps
Bump Docker Go modules
2020-12-15 14:58:23 +01:00
Chris Crone 1135fb8d7a deps: Bump Docker Go modules
Signed-off-by: Chris Crone <christopher.crone@docker.com>
2020-12-15 14:07:12 +01:00
Silvin Lubecki 0edf43ac90
Merge pull request #139 from docker/fix-relog
Fix re-login when token expired
2020-11-23 14:57:02 +01:00
Djordje Lukic acb01a290e Fix re-login when token expired
* if it's a sudo re-login the user
* if not and if the toekn expired, re-login

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2020-11-23 14:50:17 +01:00
Djordje Lukic 94bd9cb11f
Merge pull request #138 from docker/token-activate
Remove token update command, replaced with token activate and token deactivate
2020-11-23 11:04:33 +01:00
Chris Crone 190137849c
Merge pull request #135 from docker/gomod-update
Update Go dependencies
2020-11-23 11:01:27 +01:00
Chris Crone ec4e4c0e82 validate: Add debug diff for go mod check
Signed-off-by: Chris Crone <christopher.crone@docker.com>
2020-11-23 10:49:44 +01:00
Chris Crone 0ae1842340 mod: Use containerized go mod tidy
Thanks @rumpl!

Signed-off-by: Chris Crone <christopher.crone@docker.com>
2020-11-23 10:49:32 +01:00
Chris Crone de0b456a62 gomod: Update dependencies
Signed-off-by: Chris Crone <christopher.crone@docker.com>
2020-11-23 10:46:22 +01:00
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
Silvin Lubecki 06a23b6d7b
Merge pull request #137 from docker/fix-sudo-commands
Do not try to 2FA if the user is not logged-in
2020-11-20 18:16:15 +01:00
Djordje Lukic 2d6647521a Do not try to 2FA if the user is not logged-in
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2020-11-20 18:12:29 +01:00
Silvin Lubecki 8ad1a0dc0d
Merge pull request #136 from docker/chore-ls-list
Add list alias for all ls commands
2020-11-20 17:39:02 +01:00
Djordje Lukic 7ba9037579 Add list alias for all ls commands
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2020-11-20 17:19:31 +01:00
Silvin Lubecki 97aa80f592
Merge pull request #130 from docker/chore-update-readme
Update readme with login
2020-11-20 17:17:01 +01:00
Chris Crone fa9a38c2ec
Merge pull request #134 from docker/gomod
Remove unneeded dependency
2020-11-20 17:07:25 +01:00
Chris Crone a98489ae92 gomod: Remove unneeded dependency
Signed-off-by: Chris Crone <christopher.crone@docker.com>
2020-11-20 15:59:06 +01:00
Djordje Lukic 1b14f887c2
Merge pull request #133 from docker/fix-rate-limit
Fix rate-limiting alignement
2020-11-20 15:56:49 +01:00
Djordje Lukic d8f7315fe6 Fix rate limits, show the limit and not the value of the pointer...
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2020-11-20 15:51:12 +01:00
Silvin Lubecki d7485c3fa9
Merge pull request #129 from docker/feat-rate-limiting
Implement `hub-tool account rate-limiting`
2020-11-20 15:42:27 +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
Chris Crone 5c39f4672e
Merge pull request #132 from docker/login-prompt
Prompt if username is empty on login
2020-11-20 15:20:43 +01:00
Silvin Lubecki cfe11a4a1d
Merge pull request #131 from docker/colors
Correct input colors
2020-11-20 15:13:54 +01:00
Chris Crone 946378c566 commands: Correct input colors
Signed-off-by: Chris Crone <christopher.crone@docker.com>
2020-11-20 15:05:54 +01:00
Chris Crone 932cb83f18 login: Prompt if username is empty
Signed-off-by: Chris Crone <christopher.crone@docker.com>
2020-11-20 15:02:32 +01:00
Djordje Lukic 07b7d8997f Update readme with login
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2020-11-20 14:16:09 +01:00
Silvin Lubecki 2f39b6ebb3
Merge pull request #123 from docker/feat-logout
Implement logout
2020-11-20 11:21:30 +01:00
Djordje Lukic f43c559177 Return an error if the keys are not in the store any more
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2020-11-20 11:11:13 +01:00
Djordje Lukic 3992cd107d Use streams for writing
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2020-11-19 12:38:30 +01:00
Djordje Lukic 31098d16d9 Implement logout
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2020-11-19 11:20:46 +01:00
Djordje Lukic a474609122
Merge pull request #126 from docker/feat-only-ask-2fa-code
2FA token expired
2020-11-19 11:20:19 +01:00
Djordje Lukic 7f88de944e Make 2FA code input cancellable
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2020-11-19 11:01:56 +01:00
Chris Crone f5744b9e39
Merge pull request #125 from docker/bump-deps
Bump Golang and linter
2020-11-19 10:57:06 +01:00
Chris Crone 7e1f33e49a deps: Bump Golang, linter
Signed-off-by: Chris Crone <christopher.crone@docker.com>
2020-11-19 10:51:30 +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 85dc8ebeaf
Merge pull request #120 from docker/2fa
2fa
2020-11-18 18:15:35 +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 bb946e0aa3
Merge pull request #119 from docker/rm-improvements
Tag and repo rm improvements
2020-11-18 14:29:38 +01:00
Chris Crone a57acd5db5 tag,repo.rm: UX improvements
* Don't block on repo rm
* Only require y/n input for removing a tag
* Add warning message

Signed-off-by: Chris Crone <christopher.crone@docker.com>
2020-11-17 17:51:23 +01:00
Chris Crone 4e52218509
Merge pull request #118 from docker/logger
Add logging to Hub client
2020-11-13 10:56:15 +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 426d37fe87
Merge pull request #117 from docker/error-handling
Improve error message from server
2020-11-12 18:32:37 +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 af35f75404
Merge pull request #116 from docker/respect-sigint
Handle ctrl+C in tag rm prompt
2020-11-12 18:04:53 +01:00
Chris Crone 59240c977f tag.rm: Stop reading user input on signal
Signed-off-by: Chris Crone <christopher.crone@docker.com>
2020-11-12 18:01:29 +01:00
Silvin Lubecki 8aa91a94ca
Merge pull request #115 from docker/better-403
Return server message on bad status
2020-11-12 16:06:02 +01:00