.nh .TH podman-login 1 .SH NAME .PP podman-login - Log in to a container registry .SH SYNOPSIS .PP \fBpodman login\fP [\fIoptions\fP] [\fIregistry\fP] .SH DESCRIPTION .PP \fBpodman login\fP logs into a specified registry server with the correct username and password. If the registry is not specified, the first registry under [registries.search] from registries.conf is used. \fBpodman login\fP reads in the username and password from STDIN. The username and password can also be set using the \fBusername\fP and \fBpassword\fP flags. The path of the authentication file can be specified by the user by setting the \fBauthfile\fP flag. The default path for reading and writing credentials is \fB${XDG_RUNTIME_DIR}/containers/auth.json\fP\&. Podman uses existing credentials if the user does not pass in a username. Podman first searches for the username and password in the \fB${XDG_RUNTIME_DIR}/containers/auth.json\fP, if they are not valid, Podman then uses any existing credentials found in \fB$HOME/.docker/config.json\fP\&. If those credentials are not present, Podman creates \fB${XDG_RUNTIME_DIR}/containers/auth.json\fP (if the file does not exist) and then stores the username and password from STDIN as a base64 encoded string in it. For more details about format and configurations of the auth.json file, see containers-auth.json(5) .PP \fBpodman [GLOBAL OPTIONS]\fP .PP \fBpodman login [GLOBAL OPTIONS]\fP .PP \fBpodman login [OPTIONS] [REGISTRY] [GLOBAL OPTIONS]\fP .SH OPTIONS .SS \fB--authfile\fP=\fIpath\fP .PP Path of the authentication file. Default is \fB${XDG_RUNTIME_DIR}/containers/auth.json\fR on Linux, and \fB$HOME/.config/containers/auth.json\fR on Windows/macOS. The file is created by \fBpodman login\fP\&. If the authorization state is not found there, \fB$HOME/.docker/config.json\fR is checked, which is set using \fBdocker login\fP\&. .PP Note: There is also the option to override the default path of the authentication file by setting the \fBREGISTRY_AUTH_FILE\fR environment variable. This can be done with \fBexport REGISTRY_AUTH_FILE=\fIpath\fP\fP\&. .SS \fB--cert-dir\fP=\fIpath\fP .PP Use certificates at \fIpath\fP (*\&.crt, *\&.cert, *\&.key) to connect to the registry. (Default: /etc/containers/certs.d) For details, see \fBcontainers-certs.d(5)\fP\&. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines) .SS \fB--compat-auth-file\fP=\fIpath\fP .PP Instead of updating the default credentials file, update the one at \fIpath\fP, and use a Docker-compatible format. .SS \fB--get-login\fP .PP Return the logged-in user for the registry. Return error if no login is found. .SS \fB--help\fP, \fB-h\fP .PP Print usage statement .SS \fB--password\fP, \fB-p\fP=\fIpassword\fP .PP Password for registry .SS \fB--password-stdin\fP .PP Take the password from stdin .SS \fB--secret\fP=\fIname\fP .PP Read the password for the registry from the podman secret \fBname\fR\&. If --username is not specified --username=\fBname\fR is used. .SS \fB--tls-verify\fP .PP Require HTTPS and verify certificates when contacting registries (default: \fBtrue\fP). If explicitly set to \fBtrue\fP, TLS verification is used. If set to \fBfalse\fP, TLS verification is not used. If not specified, TLS verification is used unless the target registry is listed as an insecure registry in \fBcontainers-registries.conf(5)\fP .SS \fB--username\fP, \fB-u\fP=\fIusername\fP .PP Username for registry .SS \fB--verbose\fP, \fB-v\fP .PP print detailed information about credential store .SH EXAMPLES .EX $ podman login docker.io Username: umohnani Password: Login Succeeded! .EE .EX $ podman login -u testuser -p testpassword localhost:5000 Login Succeeded! .EE .EX $ podman login --authfile authdir/myauths.json docker.io Username: umohnani Password: Login Succeeded! .EE .EX $ echo -n MySecret! | podman secret create secretname - a0ad54df3c97cf89d5ca6193c $ podman login --secret secretname -u testuser quay.io Login Succeeded! .EE .EX $ podman login --tls-verify=false -u test -p test localhost:5000 Login Succeeded! .EE .EX $ podman login --cert-dir /etc/containers/certs.d/ -u foo -p bar localhost:5000 Login Succeeded! .EE .EX $ podman login -u testuser --password-stdin < testpassword.txt docker.io Login Succeeded! .EE .EX $ echo $testpassword | podman login -u testuser --password-stdin docker.io Login Succeeded! .EE .EX $ podman login quay.io --verbose Username: myusername Password: Used: /run/user/1000/containers/auth.json Login Succeeded! .EE .SH SEE ALSO .PP \fBpodman(1)\fP, \fBpodman-logout(1)\fP, \fBcontainers-auth.json(5)\fP, \fBcontainers-certs.d(5)\fP, \fBcontainers-registries.conf(5)\fP, \fBpodman-secret(1)\fP, \fBpodman-secret-create(1)\fP .SH HISTORY .PP August 2017, Originally compiled by Urvashi Mohnani umohnani@redhat.com \[la]mailto:umohnani@redhat.com\[ra]