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.  (Default:  /etc/containers/certs.d) Please refer to containers-
56       certs.d(5) for details. (This option is not available with  the  remote
57       Podman client, including Mac and Windows (excluding WSL2) machines)
58
59
60   --get-login
61       Return  the  logged-in user for the registry.  Return error if no login
62       is found.
63
64
65   --help, -h
66       Print usage statement
67
68
69   --password, -p=password
70       Password for registry
71
72
73   --password-stdin
74       Take the password from stdin
75
76
77   --tls-verify
78       Require HTTPS and verify certificates when contacting  registries  (de‐
79       fault:  true). If explicitly set to true, then TLS verification will be
80       used. If set to false, then TLS verification will not be used.  If  not
81       specified,  TLS verification will be used unless the target registry is
82       listed as an insecure registry in registries.conf.
83
84
85   --username, -u=username
86       Username for registry
87
88
89   --verbose, -v
90       print detailed information about credential store
91
92

EXAMPLES

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

SEE ALSO

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

HISTORY

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