Fix login documentation layout

ddadd3db49 mass standardized the
formatting, with some errors.

This commit fixes errors on `login.md`:
- revert wrong `Logging out` headline
- restore correct level for some headlines (relative to parent
  headline level change)
- re-add `Usage` headlines, with better name

Also add `related commands` headline on `login` and `logout`.

Signed-off-by: Thomas Riccardi <thomas@deepomatic.com>
This commit is contained in:
Thomas Riccardi 2018-10-03 20:04:24 +02:00
parent 608b6632b0
commit a0e3ec8790
2 changed files with 13 additions and 3 deletions

View File

@ -85,6 +85,8 @@ you can download them from:
- Microsoft Windows Credential Manager: https://github.com/docker/docker-credential-helpers/releases - Microsoft Windows Credential Manager: https://github.com/docker/docker-credential-helpers/releases
- [pass](https://www.passwordstore.org/): https://github.com/docker/docker-credential-helpers/releases - [pass](https://www.passwordstore.org/): https://github.com/docker/docker-credential-helpers/releases
#### Configure the credentials store
You need to specify the credentials store in `$HOME/.docker/config.json` You need to specify the credentials store in `$HOME/.docker/config.json`
to tell the docker engine to use it. The value of the config property should be to tell the docker engine to use it. The value of the config property should be
the suffix of the program to use (i.e. everything after `docker-credential-`). the suffix of the program to use (i.e. everything after `docker-credential-`).
@ -99,7 +101,7 @@ For example, to use `docker-credential-osxkeychain`:
If you are currently logged in, run `docker logout` to remove If you are currently logged in, run `docker logout` to remove
the credentials from the file and run `docker login` again. the credentials from the file and run `docker login` again.
### Default behavior #### Default behavior
By default, Docker looks for the native binary on each of the platforms, i.e. By default, Docker looks for the native binary on each of the platforms, i.e.
"osxkeychain" on macOS, "wincred" on windows, and "pass" on Linux. A special "osxkeychain" on macOS, "wincred" on windows, and "pass" on Linux. A special
@ -108,7 +110,7 @@ it cannot find the "pass" binary. If none of these binaries are present, it
stores the credentials (i.e. password) in base64 encoding in the config files stores the credentials (i.e. password) in base64 encoding in the config files
described above. described above.
### Credential helper protocol #### Credential helper protocol
Credential helpers can be any program or script that follows a very simple protocol. Credential helpers can be any program or script that follows a very simple protocol.
This protocol is heavily inspired by Git, but it differs in the information shared. This protocol is heavily inspired by Git, but it differs in the information shared.
@ -162,7 +164,7 @@ designated programs to handle credentials for *specific registries*. The default
credential store (`credsStore` or the config file itself) will not be used for credential store (`credsStore` or the config file itself) will not be used for
operations concerning credentials of the specified registries. operations concerning credentials of the specified registries.
### Logging out #### Configure credential helpers
If you are currently logged in, run `docker logout` to remove If you are currently logged in, run `docker logout` to remove
the credentials from the default store. the credentials from the default store.
@ -182,3 +184,7 @@ For example:
} }
} }
``` ```
## Related commands
* [logout](logout.md)

View File

@ -30,3 +30,7 @@ Options:
```bash ```bash
$ docker logout localhost:8080 $ docker logout localhost:8080
``` ```
## Related commands
* [login](login.md)