mirror of https://github.com/docker/cli.git
3f19902eae
The config.json allows for setting custom HTTP headers, but given that User-Agent is not customizable, we should remove it from the config before saving; Before this change; $ cat ~/.docker/config.json { "auths": { "https://index.docker.io/v1/": { "auth": "<base64 auth>" } }, "HttpHeaders": { "User-Agent": "Docker-Client/19.03.12 (linux)" } } $ docker logout { "auths": {}, "HttpHeaders": { "User-Agent": "Docker-Client/19.03.12 (linux)" } } After this change: $ cat ~/.docker/config.json { "auths": { "https://index.docker.io/v1/": { "auth": "<base64 auth>" } }, "HttpHeaders": { "User-Agent": "Docker-Client/19.03.12 (linux)" } } $ docker logout Removing login credentials for https://index.docker.io/v1/ $ cat ~/.docker/config.json { "auths": {} } Signed-off-by: Sebastiaan van Stijn <github@gone.nl> |
||
---|---|---|
.. | ||
configfile | ||
credentials | ||
types | ||
config.go | ||
config_test.go |