File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
components/supervisor/pkg/supervisor Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -314,26 +314,26 @@ func insertCredentialsIntoConfig(imageAuth string) (int, error) {
314314 authenticationPerHost := strings .Split (imageAuth , "," )
315315 for _ , hostCredentialsEntry := range authenticationPerHost {
316316 parts := strings .SplitN (hostCredentialsEntry , ":" , 3 )
317- var registryIdentifier string
317+ var host string
318318 var token string
319319
320320 switch len (parts ) {
321321 case 2 :
322- registryIdentifier = parts [0 ]
322+ host = parts [0 ]
323323 token = parts [1 ]
324324 case 3 :
325- registryIdentifier = parts [0 ] + ":" + parts [1 ]
325+ host = parts [0 ] + ":" + parts [1 ]
326326 token = parts [2 ]
327327 default :
328328 log .Warnf ("authentication: skipping credential (parts count %d not 2 or 3): '%s'" , len (parts ), hostCredentialsEntry )
329329 continue
330330 }
331- registryKey := registryIdentifier
332- if registryIdentifier == "docker.io" || strings .HasSuffix (registryIdentifier , ".docker.io" ) {
333- registryKey = "https://index.docker.io/v1/"
331+
332+ if host == "docker.io" || strings .HasSuffix (host , ".docker.io" ) {
333+ host = "https://index.docker.io/v1/"
334334 }
335335
336- authConfig .Auths [registryKey ] = RegistryAuth {
336+ authConfig .Auths [host ] = RegistryAuth {
337337 Auth : token ,
338338 }
339339 }
You can’t perform that action at this time.
0 commit comments