hub-tool icon indicating copy to clipboard operation
hub-tool copied to clipboard

Add a --token global flag

Open silvin-lubecki opened this issue 5 years ago • 2 comments

A user activating the 2FA on his/her account makes the hub-tool ask for 6-digit code in a regularly basis. This behavior doesn't fit well with CI use cases. We should add a global flag like --token which accepts a Personal Access Token (with its current limitations) to bypass 2FA login. We may also support an env var DOCKER_HUB_PERSONAL_ACCESS_TOKEN.

silvin-lubecki avatar Nov 20 '20 11:11 silvin-lubecki

Will the token be passed on the command line, or through stdin?

wrt the env-var: we should come to a good name for that (and if we implement, use the same name for all our cli's), as it may be important to allow scanning for such env-vars being committed to source control etc

thaJeztah avatar Nov 20 '20 11:11 thaJeztah

Something similar to docker's --password-stdin option would be very nice!

zliang-akamai avatar Apr 28 '24 04:04 zliang-akamai