1podman-login(1)() 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 --password, -p=password
44 Password for registry
45
46
47 --password-stdin
48 Take the password from stdin
49
50
51 --username, -u=username
52 Username for registry
53
54
55 --authfile=path
56 Path of the authentication file. Default is ${XDG_RUNTIME_DIR}/contain‐
57 ers/auth.json.
58
59
60 Note: You can also override the default path of the authentication file
61 by setting the REGISTRY_AUTH_FILE environment variable. export REG‐
62 ISTRY_AUTH_FILE=path
63
64
65 --get-login
66 Return the logged-in user for the registry. Return error if no login
67 is found.
68
69
70 --cert-dir=path
71 Use certificates at path (*.crt, *.cert, *.key) to connect to the reg‐
72 istry. Please refer to containers-certs.d(5) for details. (This option
73 is not available with the remote Podman client)
74
75
76 --tls-verify=true|false
77 Require HTTPS and verify certificates when contacting registries (de‐
78 fault: true). If explicitly set to true, then TLS verification will be
79 used. If set to false, then TLS verification will not be used. If not
80 specified, TLS verification will be used unless the target registry is
81 listed as an insecure registry in registries.conf.
82
83
84 --help, -h
85 Print usage statement
86
87
89 $ podman login docker.io
90 Username: umohnani
91 Password:
92 Login Succeeded!
93
94
95
96 $ podman login -u testuser -p testpassword localhost:5000
97 Login Succeeded!
98
99
100
101 $ podman login --authfile authdir/myauths.json docker.io
102 Username: umohnani
103 Password:
104 Login Succeeded!
105
106
107
108 $ podman login --tls-verify=false -u test -p test localhost:5000
109 Login Succeeded!
110
111
112
113 $ podman login --cert-dir /etc/containers/certs.d/ -u foo -p bar localhost:5000
114 Login Succeeded!
115
116
117
118 $ podman login -u testuser --password-stdin < testpassword.txt docker.io
119 Login Succeeded!
120
121
122
123 $ echo $testpassword | podman login -u testuser --password-stdin docker.io
124 Login Succeeded!
125
126
127
129 podman(1), podman-logout(1), containers-auth.json(5), contain‐
130 ers-certs.d(5), containers-registries.conf(5)
131
132
134 August 2017, Originally compiled by Urvashi Mohnani umohnani@redhat.com
135 ⟨mailto:umohnani@redhat.com⟩
136
137
138
139 podman-login(1)()