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.
20
21
22 buildah [GLOBAL OPTIONS]
23
24
25 buildah login [GLOBAL OPTIONS]
26
27
28 buildah login [OPTIONS] REGISTRY [GLOBAL OPTIONS]
29
30
32 --password, -p
33
34
35 Password for registry
36
37
38 --password-stdin
39
40
41 Take the password from stdin
42
43
44 --username, -u
45
46
47 Username for registry
48
49
50 --authfile
51
52
53 Path of the authentication file. Default is ${XDG_\RUNTIME_DIR}/con‐
54 tainers/auth.json
55
56
57 Note: You can also override the default path of the authentication file
58 by setting the REGISTRY_AUTH_FILE environment variable. export REG‐
59 ISTRY_AUTH_FILE=path
60
61
62 --get-login
63
64
65 Return the logged-in user for the registry. Return error if no login
66 is found.
67
68
69 --cert-dir path
70
71
72 Use certificates at path (*.crt, *.cert, *.key) to connect to the reg‐
73 istry. The default certificates directory is /etc/containers/certs.d.
74
75
76 --tls-verify
77
78
79 Require HTTPS and verification of certificates when talking to con‐
80 tainer registries (default: true). If explicitly set to true, then TLS
81 verification will be used. If set to false, then TLS verification will
82 not be used. If not specified, TLS verification will be used unless the
83 target registry is listed as an insecure registry in registries.conf.
84 TLS verification cannot be used when talking to an insecure registry.
85
86
87 --help, -h
88
89
90 Print usage statement
91
92
94 $ buildah login docker.io
95 Username: qiwanredhat
96 Password:
97 Login Succeeded!
98
99
100
101 $ buildah login -u testuser -p testpassword localhost:5000
102 Login Succeeded!
103
104
105
106 $ buildah login --authfile ./auth.json docker.io
107 Username: qiwanredhat
108 Password:
109 Login Succeeded!
110
111
112
113 $ buildah login --tls-verify=false -u test -p test localhost:5000
114 Login Succeeded!
115
116
117
118 $ buildah login --cert-dir /etc/containers/certs.d/ -u foo -p bar localhost:5000
119 Login Succeeded!
120
121
122
123 $ buildah login -u testuser --password-stdin < pw.txt docker.io
124 Login Succeeded!
125
126
127
128 $ echo $testpassword | buildah login -u testuser --password-stdin docker.io
129 Login Succeeded!
130
131
132
134 buildah(1), buildah-logout(1)
135
136
137
138buildah Apr 2019 buildah-login(1)