Commit Graph

7 Commits

Author SHA1 Message Date
Daniel J Walsh 6172fd7db6 Add support for DOCKER_CONFIG
DOCKER_CONFIG environment variable is sometimes used to point
to the config.json.  The container engines use REGISTRY_AUTH_FILE
for similar functionality.  This PR causes programs that use
GetAuthFile to use DOCKER_CONFIG if it set and REGISTRY_AUTH_FILE
is not.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-21 17:07:24 -05:00
Sascha Grunert 89b399d4cf Fix all gocritic lints
This enables the missing gocritic checks and fixes all of the lints.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-08-25 20:58:15 +02:00
Daniel J Walsh 276ce73e39 Fix duplicated code found by codeverity.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-08-12 10:55:46 -04:00
Qi Wang cdc87dc2bd logout suggests logout with docker
logout suggests logout with docker if credential exists in ~/.docker/config,json

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-06-09 20:49:43 -04:00
Miloslav Trmač 1eb5ce9b5b Implement *.AuthFile and LoginOptions.CertDir
... so that the callers don't have to implement options they
haven't defined.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2020-05-07 22:50:21 +02:00
Qi Wang 1d57954f2c auth pkg supports login empty argument
Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-05-06 12:16:50 -04:00
Qi Wang 6b9441182d Add pkg/auth common code for login/logout
pkg/auth includes CLI options definitions and implementatoin of login/logout.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-04-09 13:38:57 -04:00