@@ -117,7 +117,7 @@ def parse_auth(entries, raise_on_error=False):
117
117
118
118
conf = {}
119
119
for registry , entry in six .iteritems (entries ):
120
- if not ( isinstance (entry , dict ) and 'auth' in entry ):
120
+ if not isinstance (entry , dict ):
121
121
log .debug (
122
122
'Config entry for key {0} is not auth config' .format (registry )
123
123
)
@@ -130,6 +130,16 @@ def parse_auth(entries, raise_on_error=False):
130
130
'Invalid configuration for registry {0}' .format (registry )
131
131
)
132
132
return {}
133
+ if 'auth' not in entry :
134
+ # Starting with engine v1.11 (API 1.23), an empty dictionary is
135
+ # a valid value in the auths config.
136
+ # https://github.com/docker/compose/issues/3265
137
+ log .debug (
138
+ 'Auth data for {0} is absent. Client might be using a '
139
+ 'credentials store instead.'
140
+ )
141
+ return {}
142
+
133
143
username , password = decode_auth (entry ['auth' ])
134
144
log .debug (
135
145
'Found entry (registry={0}, username={1})'
@@ -189,6 +199,9 @@ def load_config(config_path=None):
189
199
if data .get ('HttpHeaders' ):
190
200
log .debug ("Found 'HttpHeaders' section" )
191
201
res .update ({'HttpHeaders' : data ['HttpHeaders' ]})
202
+ if data .get ('credsStore' ):
203
+ log .debug ("Found 'credsStore' section" )
204
+ res .update ({'credsStore' : data ['credsStore' ]})
192
205
if res :
193
206
return res
194
207
else :
0 commit comments