podman-login(1)
โจ podman-login(1) โ Log in to a container registry ๐
okay bestie, listen up, this is the podman login manual page (yep, that's the podman-login(1) one, General Commands Manual vibes) and it is lowkey the glow-up your registry credentials have been waiting for ๐ซถ
๐ธ NAME ๐ธ
podman-login โ log in to a container registry ๐
โจ SYNOPSIS โจ
podman login [options] [registry]
๐ DESCRIPTION ๐
So like, podman login logs you into a registry server with the correct username and password. That's it, that's the whole girlboss move ๐
If you don't specify the registry? No stress, it uses the first registry under [registries.search] from registries.conf. Periodt.
Here's the tea on how it gets your creds:
podman loginreads the username and password fromSTDIN๐ฅ- you can also set them with the
usernameandpasswordflags - you can pick where the auth file lives with the
authfileflag - the default path for reading and writing credentials is
${XDG_RUNTIME_DIR}/containers/auth.json
Podman is not about to make you retype stuff. If you don't pass in a username, it uses existing credentials. The order it goes in is:
- it first searches for the username and password in
${XDG_RUNTIME_DIR}/containers/auth.json - if those aren't valid, it then uses any existing credentials found in
$HOME/.docker/config.json - if those credentials aren't present either, Podman creates
${XDG_RUNTIME_DIR}/containers/auth.json(only if the file doesn't exist) and then stores the username and password fromSTDINas a base64 encoded string in it ๐ฅ
For more details about format and configurations of the auth.json file, see containers-auth.json(5).
And the invocation shapes, because we love options:
podman [GLOBAL OPTIONS]
podman login [GLOBAL OPTIONS]
podman login [OPTIONS] [REGISTRY] [GLOBAL OPTIONS]
๐ OPTIONS ๐
--authfile=pathโ the path of the authentication file. Default is${XDG_RUNTIME_DIR}/containers/auth.jsonon Linux, and$HOME/.config/containers/auth.jsonon Windows/macOS ๐ฅ๏ธ The file is created bypodman login. If the authorization state isn't found there,$HOME/.docker/config.jsonis checked, which is the one set usingdocker login.
Note: you can also override the default path of the authentication file by setting theREGISTRY_AUTH_FILEenvironment variable. Do it like this:export REGISTRY_AUTH_FILE=path๐ซ
--cert-dir=pathโ use certificates at path (*.crt,*.cert,*.key) to connect to the registry. (Default:/etc/containers/certs.d) For details, seecontainers-certs.d(5). ๐ง (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines โ sad, I know ๐ญ)--compat-auth-file=pathโ instead of updating the default credentials file, update the one at path, and use a Docker-compatible format ๐ณ--get-loginโ return the logged-in user for the registry. Returns an error if no login is found. Bestie, if there's nothing there, it's gonna tell you ๐--help,-hโ print usage statement ๐--password,-p=passwordโ password for registry ๐คซ--password-stdinโ take the password from stdin ๐ฅ--secret=nameโ read the password for the registry from the podman secret name. If--usernameis not specified,--username=nameis used ๐--tls-verifyโ require HTTPS and verify certificates when contacting registries (default:true). If explicitly set totrue, TLS verification is used. If set tofalse, TLS verification is not used. If not specified, TLS verification is used unless the target registry is listed as an insecure registry incontainers-registries.conf(5)๐--username,-u=usernameโ username for registry ๐ชช--verbose,-vโ print detailed information about credential store ๐
๐ EXAMPLES ๐
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 ephemeral directory) and hence do not persist across reboot ๐ญ
$ podman login quay.io
Username: umohnani
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
Login Succeeded!
Add login credentials for alternate authfile path for the specified registry ๐๏ธ
$ podman login --authfile authdir/myauths.json quay.io
Username: umohnani
Password:
Login Succeeded!
Add login credentials using a Podman secret for the password ๐คซ
$ echo -n MySecret! | podman secret create secretname -
a0ad54df3c97cf89d5ca6193c
$ podman login --secret secretname -u testuser quay.io
Login Succeeded!
Add login credentials for user test with password test to localhost:5000 registry disabling tls verification requirement ๐
$ podman login --tls-verify=false -u test -p test localhost:5000
Login Succeeded!
Add login credentials for user foo with password bar to localhost:5000 registry using the certificate directory /etc/containers/certs.d ๐
$ podman login --cert-dir /etc/containers/certs.d/ -u foo -p bar localhost:5000
Login Succeeded!
Add login credentials for specified registries to default authentication file for given user with password information provided via stdin from a file on disk ๐
$ podman login -u testuser --password-stdin < testpassword.txt docker.io
Login Succeeded!
Add login credentials for specified registry to default authentication file for given user with password information provided via stdin from a pipe ๐ช
$ echo $testpassword | podman login -u testuser --password-stdin quay.io
Login Succeeded!
Add login credentials for specified registry to default authentication file in verbose mode ๐
$ podman login quay.io --verbose
Username: myusername
Password:
Used: /run/user/1000/containers/auth.json
Login Succeeded!
๐ SEE ALSO ๐
podman(1), podman-logout(1), containers-auth.json(5), containers-certs.d(5), containers-registries.conf(5), podman-secret(1), podman-secret-create(1)
๐ HISTORY ๐
August 2017, Originally compiled by Urvashi Mohnani umohnani@redhat.com โจmailto:umohnani@redhat.comโฉ
okay that's the whole page bestie, you ate that ๐ this was podman-login(1) from the General Commands Manual, originally compiled back in August 2017 by Urvashi Mohnani โ go log into something and slay, iykyk ๐โจ๐ฆ
๐ฆ where this page comes from
- arch rolling: podman-docker 6.1.4-1 ยท Apache-2.0
- fedora 43: podman-docker 5:5.6.2-1.fc43 ยท Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- fedora 43: podman-docker 5:5.8.4-1.fc43
- fedora 43: podman-docker 5:5.8.8-1.fc43
- fedora 43: podman-docker 5:5.8.9-1.fc43 ยท Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- fedora 44: podman-docker 5:5.8.1-1.fc44 ยท Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- fedora 44: podman-docker 5:5.8.7-1.fc44
- fedora 44: podman-docker 5:5.8.9-1.fc44 ยท Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- ubuntu resolute: podman-docker 5.7.0+ds2-3build1 ยท Apache-2.0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms