mirror of https://github.com/containers/podman.git
docs/podman-login: Give an example of writing the persistent path
The way `podman login` works by default is fundamentally different from `docker login` and this causes a lot of confusion, and I have seen multiple bad suggestions for ways to address this such as setting `XDG_RUNTIME_DIR`. Let's document up front how to write to the persistent path. Signed-off-by: Colin Walters <walters@verbum.org>
This commit is contained in:
parent
8ec8214525
commit
f7b9168649
|
|
@ -69,7 +69,10 @@ print detailed information about credential store
|
|||
|
||||
## EXAMPLES
|
||||
|
||||
Add login credentials for specified registry to default authentication file.
|
||||
Add login credentials for specified registry to default authentication file;
|
||||
note that unlike the `docker` default, the default credentials are under `$XDG_RUNTIME_DIR`
|
||||
which is a subdirectory of `/run` (an emphemeral directory) and hence do not persist across reboot.
|
||||
|
||||
```
|
||||
$ podman login quay.io
|
||||
Username: umohnani
|
||||
|
|
@ -77,6 +80,16 @@ Password:
|
|||
Login Succeeded!
|
||||
```
|
||||
|
||||
To explicitly preserve credentials across reboot, you will need to specify
|
||||
the default persistent path:
|
||||
|
||||
```
|
||||
$ podman login --authfile ~/.config/containers/auth.json quay.io
|
||||
Username: umohnani
|
||||
Password:
|
||||
Login Succeeded!
|
||||
```
|
||||
|
||||
Add login credentials using specified username and password for local registry to default authentication file.
|
||||
```
|
||||
$ podman login -u testuser -p testpassword localhost:5000
|
||||
|
|
|
|||
Loading…
Reference in New Issue