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 --password, -p
34
35
36 Password for registry
37
38
39 --password-stdin
40
41
42 Take the password from stdin
43
44
45 --username, -u
46
47
48 Username for registry
49
50
51 --authfile
52
53
54 Path of the authentication file. Default is ${XDG_\RUNTIME_DIR}/con‐
55 tainers/auth.json. If XDG_RUNTIME_DIR is not set, the default is
56 /run/containers/$UID/auth.json. This file is created using using buil‐
57 dah login.
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
67
68 Return the logged-in user for the registry. Return error if no login
69 is found.
70
71
72 --cert-dir path
73
74
75 Use certificates at path (*.crt, *.cert, *.key) to connect to the reg‐
76 istry. The default certificates directory is /etc/containers/certs.d.
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 --help, -h
91
92
93 Print usage statement
94
95
97 $ buildah login docker.io
98 Username: qiwanredhat
99 Password:
100 Login Succeeded!
101
102
103
104 $ buildah login -u testuser -p testpassword localhost:5000
105 Login Succeeded!
106
107
108
109 $ buildah login --authfile ./auth.json docker.io
110 Username: qiwanredhat
111 Password:
112 Login Succeeded!
113
114
115
116 $ buildah login --tls-verify=false -u test -p test localhost:5000
117 Login Succeeded!
118
119
120
121 $ buildah login --cert-dir /etc/containers/certs.d/ -u foo -p bar localhost:5000
122 Login Succeeded!
123
124
125
126 $ buildah login -u testuser --password-stdin < pw.txt docker.io
127 Login Succeeded!
128
129
130
131 $ echo $testpassword | buildah login -u testuser --password-stdin docker.io
132 Login Succeeded!
133
134
135
137 buildah(1), buildah-logout(1)
138
139
140
141buildah Apr 2019 buildah-login(1)