1podman-login(1) General Commands Manual podman-login(1)
2
3
4
6 podman-login - Login to a container registry
7
8
10 podman login [options] [registry]
11
12
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 will be used. pod‐
17 man login reads in the username and password from STDIN. The username
18 and password can also be set using the username and password flags.
19 The path of the authentication file can be specified by the user by
20 setting the authfile flag. The default path for reading and writing
21 credentials is ${XDG_RUNTIME_DIR}/containers/auth.json. Podman will
22 use existing credentials if the user does not pass in a username. Pod‐
23 man will first search for the username and password in the ${XDG_RUN‐
24 TIME_DIR}/containers/auth.json, if they are not valid, Podman will then
25 use any existing credentials found in $HOME/.docker/config.json. If
26 those credentials are not present, Podman will create ${XDG_RUN‐
27 TIME_DIR}/containers/auth.json (if the file does not exist) and will
28 then store the username and password from STDIN as a base64 encoded
29 string in it. For more details about format and configurations of the
30 auth.json file, please refer to containers-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
43 --authfile=path
44 Path of the authentication file. Default is ${XDG_RUNTIME_DIR}/contain‐
45 ers/auth.json, which is set using podman login. If the authorization
46 state is not found there, $HOME/.docker/config.json is checked, which
47 is set using docker login.
48
49
50 Note: There is also the option to override the default path of the au‐
51 thentication file by setting the REGISTRY_AUTH_FILE environment vari‐
52 able. This can be done with export REGISTRY_AUTH_FILE=path.
53
54
55 --cert-dir=path
56 Use certificates at path (*.crt, *.cert, *.key) to connect to the reg‐
57 istry. (Default: /etc/containers/certs.d) Please refer to containers-
58 certs.d(5) for details. (This option is not available with the remote
59 Podman client, including Mac and Windows (excluding WSL2) machines)
60
61
62 --get-login
63 Return the logged-in user for the registry. Return error if no login
64 is found.
65
66
67 --help, -h
68 Print usage statement
69
70
71 --password, -p=password
72 Password for registry
73
74
75 --password-stdin
76 Take the password from stdin
77
78
79 --tls-verify
80 Require HTTPS and verify certificates when contacting registries (de‐
81 fault: true). If explicitly set to true, TLS verification will be
82 used. If set to false, TLS verification will not be used. If not
83 specified, TLS verification will be used unless the target registry is
84 listed as an insecure registry in containers-registries.conf(5)
85
86
87 --username, -u=username
88 Username for registry
89
90
91 --verbose, -v
92 print detailed information about credential store
93
94
96 $ podman login docker.io
97 Username: umohnani
98 Password:
99 Login Succeeded!
100
101
102
103 $ podman login -u testuser -p testpassword localhost:5000
104 Login Succeeded!
105
106
107
108 $ podman login --authfile authdir/myauths.json docker.io
109 Username: umohnani
110 Password:
111 Login Succeeded!
112
113
114
115 $ podman login --tls-verify=false -u test -p test localhost:5000
116 Login Succeeded!
117
118
119
120 $ podman login --cert-dir /etc/containers/certs.d/ -u foo -p bar localhost:5000
121 Login Succeeded!
122
123
124
125 $ podman login -u testuser --password-stdin < testpassword.txt docker.io
126 Login Succeeded!
127
128
129
130 $ echo $testpassword | podman login -u testuser --password-stdin docker.io
131 Login Succeeded!
132
133
134
135 $ podman login quay.io --verbose
136 Username: myusername
137 Password:
138 Used: /run/user/1000/containers/auth.json
139 Login Succeeded!
140
141
142
144 podman(1), podman-logout(1), containers-auth.json(5), containers-
145 certs.d(5), containers-registries.conf(5)
146
147
149 August 2017, Originally compiled by Urvashi Mohnani umohnani@redhat.com
150 ⟨mailto:umohnani@redhat.com⟩
151
152
153
154 podman-login(1)