1buildah-login(1) General Commands Manual buildah-login(1)
2
3
4
6 buildah-login - Login to a container registry
7
8
10 buildah login [options] registry
11
12
14 buildah login logs into a specified registry server with the correct
15 username and password. buildah login reads in the username and password
16 from STDIN. The username and password can also be set using the user‐
17 name and password flags. The path of the authentication file can be
18 specified by the user by setting the authfile flag. The default path
19 used is ${XDG_RUNTIME_DIR}/containers/auth.json. If XDG_RUNTIME_DIR is
20 not set, the default is /run/containers/$UID/auth.json.
21
22
23 buildah [GLOBAL OPTIONS]
24
25
26 buildah login [GLOBAL OPTIONS]
27
28
29 buildah login [OPTIONS] REGISTRY [GLOBAL OPTIONS]
30
31
33 --authfile
34
35
36 Path of the authentication file. Default is ${XDG_\RUNTIME_DIR}/con‐
37 tainers/auth.json. If XDG_RUNTIME_DIR is not set, the default is
38 /run/containers/$UID/auth.json. This file is created using buildah lo‐
39 gin.
40
41
42 Note: You can also override the default path of the authentication file
43 by setting the REGISTRY_AUTH_FILE environment variable. export REG‐
44 ISTRY_AUTH_FILE=path
45
46
47 --cert-dir path
48
49
50 Use certificates at path (*.crt, *.cert, *.key) to connect to the reg‐
51 istry. The default certificates directory is /etc/containers/certs.d.
52
53
54 --get-login
55
56
57 Return the logged-in user for the registry. Return error if no login
58 is found.
59
60
61 --help, -h
62
63
64 Print usage statement
65
66
67 --password, -p
68
69
70 Password for registry
71
72
73 --password-stdin
74
75
76 Take the password from stdin
77
78
79 --tls-verify
80
81
82 Require HTTPS and verification of certificates when talking to con‐
83 tainer registries (default: true). If explicitly set to true, then TLS
84 verification will be used. If set to false, then TLS verification will
85 not be used. If not specified, TLS verification will be used unless the
86 target registry is listed as an insecure registry in registries.conf.
87 TLS verification cannot be used when talking to an insecure registry.
88
89
90 --username, -u
91
92
93 Username for registry
94
95
96 --verbose, -v
97
98
99 print detailed information about credential store
100
101
103 $ buildah login quay.io
104 Username: qiwanredhat
105 Password:
106 Login Succeeded!
107
108
109
110 $ buildah login -u testuser -p testpassword localhost:5000
111 Login Succeeded!
112
113
114
115 $ buildah login --authfile ./auth.json quay.io
116 Username: qiwanredhat
117 Password:
118 Login Succeeded!
119
120
121
122 $ buildah login --tls-verify=false -u test -p test localhost:5000
123 Login Succeeded!
124
125
126
127 $ buildah login --cert-dir /etc/containers/certs.d/ -u foo -p bar localhost:5000
128 Login Succeeded!
129
130
131
132 $ buildah login -u testuser --password-stdin < pw.txt quay.io
133 Login Succeeded!
134
135
136
137 $ echo $testpassword | buildah login -u testuser --password-stdin quay.io
138 Login Succeeded!
139
140
141
143 buildah(1), buildah-logout(1)
144
145
146
147buildah Apr 2019 buildah-login(1)