1podman-login(1)             General Commands Manual            podman-login(1)
2
3
4

NAME

6       podman-login - Log in to a container registry
7
8

SYNOPSIS

10       podman login [options] [registry]
11
12

DESCRIPTION

14       podman  login  logs  into  a specified registry server with the correct
15       username and password. If the registry is not specified, the first reg‐
16       istry  under  [registries.search]  from registries.conf is used. podman
17       login reads in the username and password from STDIN.  The username  and
18       password  can  also  be set using the username and password flags.  The
19       path of the authentication file can be specified by the user by setting
20       the authfile flag. The default path for reading and writing credentials
21       is ${XDG_RUNTIME_DIR}/containers/auth.json.  Podman uses existing  cre‐
22       dentials  if  the  user  does  not  pass  in  a username.  Podman first
23       searches for the username and password in  the  ${XDG_RUNTIME_DIR}/con‐
24       tainers/auth.json, if they are not valid, Podman then uses any existing
25       credentials found in $HOME/.docker/config.json.  If  those  credentials
26       are not present, Podman creates ${XDG_RUNTIME_DIR}/containers/auth.json
27       (if the file does not exist) and then stores the username and  password
28       from  STDIN  as  a base64 encoded string in it.  For more details about
29       format and  configurations  of  the  auth.json  file,  see  containers-
30       auth.json(5)
31
32
33       podman [GLOBAL OPTIONS]
34
35
36       podman login [GLOBAL OPTIONS]
37
38
39       podman login [OPTIONS] [REGISTRY] [GLOBAL OPTIONS]
40
41

OPTIONS

43   --authfile=path
44       Path of the authentication file. Default is ${XDG_RUNTIME_DIR}/contain‐
45       ers/auth.json on Linux, and $HOME/.config/containers/auth.json on  Win‐
46       dows/macOS.   The file is created by podman login. If the authorization
47       state is not found there, $HOME/.docker/config.json is  checked,  which
48       is set using docker login.
49
50
51       Note:  There is also the option to override the default path of the au‐
52       thentication file by setting the REGISTRY_AUTH_FILE  environment  vari‐
53       able. This can be done with export REGISTRY_AUTH_FILE=path.
54
55
56   --cert-dir=path
57       Use  certificates at path (*.crt, *.cert, *.key) to connect to the reg‐
58       istry. (Default: /etc/containers/certs.d) For details, see  containers-
59       certs.d(5).   (This  option  is  not  available  with the remote Podman
60       client, including Mac and Windows (excluding WSL2) machines)
61
62
63   --compat-auth-file=path
64       Instead of updating the default credentials file,  update  the  one  at
65       path, and use a Docker-compatible format.
66
67
68   --get-login
69       Return  the  logged-in user for the registry.  Return error if no login
70       is found.
71
72
73   --help, -h
74       Print usage statement
75
76
77   --password, -p=password
78       Password for registry
79
80
81   --password-stdin
82       Take the password from stdin
83
84
85   --secret=name
86       Read the password for the registry from the  podman  secret  name.   If
87       --username is not specified --username=name is used.
88
89
90   --tls-verify
91       Require  HTTPS  and verify certificates when contacting registries (de‐
92       fault: true).  If explicitly set to true, TLS verification is used.  If
93       set to false, TLS verification is not used.  If not specified, TLS ver‐
94       ification is used unless the target registry is listed as  an  insecure
95       registry in containers-registries.conf(5)
96
97
98   --username, -u=username
99       Username for registry
100
101
102   --verbose, -v
103       print detailed information about credential store
104
105

EXAMPLES

107       $ podman login docker.io
108       Username: umohnani
109       Password:
110       Login Succeeded!
111
112
113       $ podman login -u testuser -p testpassword localhost:5000
114       Login Succeeded!
115
116
117       $ podman login --authfile authdir/myauths.json docker.io
118       Username: umohnani
119       Password:
120       Login Succeeded!
121
122
123       $ echo -n MySecret! | podman secret create secretname -
124       a0ad54df3c97cf89d5ca6193c
125       $ podman login --secret secretname -u testuser quay.io
126       Login Succeeded!
127
128
129       $ podman login --tls-verify=false -u test -p test localhost:5000
130       Login Succeeded!
131
132
133       $ podman login --cert-dir /etc/containers/certs.d/ -u foo -p bar localhost:5000
134       Login Succeeded!
135
136
137       $ podman login -u testuser  --password-stdin < testpassword.txt docker.io
138       Login Succeeded!
139
140
141       $ echo $testpassword | podman login -u testuser --password-stdin docker.io
142       Login Succeeded!
143
144
145       $ podman login quay.io --verbose
146       Username: myusername
147       Password:
148       Used: /run/user/1000/containers/auth.json
149       Login Succeeded!
150
151
152

SEE ALSO

154       podman(1),   podman-logout(1),   containers-auth.json(5),   containers-
155       certs.d(5), containers-registries.conf(5), podman-secret(1), podman-se‐
156       cret-create(1)
157
158

HISTORY

160       August 2017, Originally compiled by Urvashi Mohnani umohnani@redhat.com
161       ⟨mailto:umohnani@redhat.com⟩
162
163
164
165                                                               podman-login(1)
Impressum