Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions docs/reference/commandline/login.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ you can download them from:
- 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

#### Configure the credentials store

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
the suffix of the program to use (i.e. everything after `docker-credential-`).
Expand All @@ -99,7 +101,7 @@ For example, to use `docker-credential-osxkeychain`:
If you are currently logged in, run `docker logout` to remove
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.
"osxkeychain" on macOS, "wincred" on windows, and "pass" on Linux. A special
Expand All @@ -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
described above.

### Credential helper protocol
#### Credential helper 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.
Expand Down Expand Up @@ -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
operations concerning credentials of the specified registries.

### Logging out
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch; would be worth to add a "Related commands" at the end of this file, to link to logout (similar to https://github.com/docker/cli/blob/master/docs/reference/commandline/plugin_create.md#related-commands)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

#### Configure credential helpers

If you are currently logged in, run `docker logout` to remove
the credentials from the default store.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're interested in making some additional changes (could be in a follow-up); I think we should include a link somewhere to the section describing where the cli configuration file is; https://github.com/docker/cli/blob/master/docs/reference/commandline/cli.md#configuration-files)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll probably do that in a follow-up PR soon.

Expand All @@ -182,3 +184,7 @@ For example:
}
}
```

## Related commands

* [logout](logout.md)
4 changes: 4 additions & 0 deletions docs/reference/commandline/logout.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@ Options:
```bash
$ docker logout localhost:8080
```

## Related commands

* [login](login.md)