podman-login
Login to a container registry
TLDR
Log in to a registry (non-persistent on Linux; persistent on Windows/macOS)
Log in to a registry persistently on Linux
Log in to an insecure (HTTP) registry
SYNOPSIS
podman login [options] REGISTRY
PARAMETERS
REGISTRY
The hostname or IP address of the container registry.
--authfile PATH
Path to the authentication file. Defaults to ${XDG_RUNTIME_DIR}/containers/auth.json if set, otherwise ${HOME}/.docker/config.json.
--cert-dir PATH
Path to the certificate directory. Defaults to /etc/docker/certs.d.
--get-login
Get the stored username of the stored credentials.
--password PASSWORD
The password to use for authentication.
--tls-verify
Require TLS verification. (Default: true)
--username USERNAME
The username to use for authentication.
DESCRIPTION
The podman-login command authenticates with a container registry. It stores the credentials securely for later use by other Podman commands like podman pull and podman push.
The command prompts for a username and password unless they are provided via command line options. It can also handle authentication with registries that require more advanced authentication mechanisms, such as token-based authentication. After successful authentication, Podman stores the credentials in a secure location within the user's home directory, using the `containers/auth.json` file to manage credentials for multiple registries.
CAVEATS
Podman stores credentials unencrypted on disk. Ensure appropriate file permissions are set to restrict access to the authentication file. Consider using a credential helper for more secure storage.
SECURITY CONSIDERATIONS
Storing credentials directly via the podman login command carries security risks. Consider using credential helpers (like `docker-credential-secretservice`) for more secure storage of passwords. These helpers store the credentials in system specific secure storage such as Keyring or Keychain.
AUTHENTICATION FILE
The authfile parameter allows you to specify a custom authentication file. This is useful for managing credentials for multiple users or environments.
HISTORY
The podman-login command was introduced as part of the Podman project to provide a user-friendly interface for authenticating with container registries. It mirrors the functionality of the Docker login command, allowing users familiar with Docker to easily transition to Podman. The command has been continuously improved to support various authentication methods and to ensure secure credential storage.
SEE ALSO
podman(1), podman-logout(1), containers-auth.json(5)