1podman-login(1)()                                            podman-login(1)()
2
3
4

NAME

6       podman-login - Login 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 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

OPTIONS

43   --authfile=path
44       Path of the authentication file. Default is ${XDG_RUNTIME_DIR}/contain‐
45       ers/auth.json.
46
47
48       Note: You can also override the default path of the authentication file
49       by  setting  the  REGISTRY_AUTH_FILE  environment variable. export REG‐
50       ISTRY_AUTH_FILE=path
51
52
53   --cert-dir=path
54       Use certificates at path (*.crt, *.cert, *.key) to connect to the  reg‐
55       istry.  Please refer to containers-certs.d(5) for details. (This option
56       is not available with the remote Podman client)
57
58
59   --get-login
60       Return the logged-in user for the registry.  Return error if  no  login
61       is found.
62
63
64   --help, -h
65       Print usage statement
66
67
68   --password, -p=password
69       Password for registry
70
71
72   --password-stdin
73       Take the password from stdin
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   --username, -u=username
85       Username for registry
86
87
88   --verbose, -v
89       print detailed information about credential store
90
91

EXAMPLES

93              $ podman login docker.io
94              Username: umohnani
95              Password:
96              Login Succeeded!
97
98
99
100              $ podman login -u testuser -p testpassword localhost:5000
101              Login Succeeded!
102
103
104
105              $ podman login --authfile authdir/myauths.json docker.io
106              Username: umohnani
107              Password:
108              Login Succeeded!
109
110
111
112              $ podman login --tls-verify=false -u test -p test localhost:5000
113              Login Succeeded!
114
115
116
117              $ podman login --cert-dir /etc/containers/certs.d/ -u foo -p bar localhost:5000
118              Login Succeeded!
119
120
121
122              $ podman login -u testuser  --password-stdin < testpassword.txt docker.io
123              Login Succeeded!
124
125
126
127              $ echo $testpassword | podman login -u testuser --password-stdin docker.io
128              Login Succeeded!
129
130
131
132              $ podman login quay.io --verbose
133              Username: myusername
134              Password:
135              Used: /run/user/1000/containers/auth.json
136              Login Succeeded!
137
138
139

SEE ALSO

141       podman(1),   podman-logout(1),   containers-auth.json(5),   containers-
142       certs.d(5), containers-registries.conf(5)
143
144

HISTORY

146       August 2017, Originally compiled by Urvashi Mohnani umohnani@redhat.com
147       ⟨mailto:umohnani@redhat.com⟩
148
149
150
151                                                             podman-login(1)()
Impressum