Skip to content

Commit

Permalink
change docker auth err to warn logs
Browse files Browse the repository at this point in the history
  • Loading branch information
tedim52 committed Nov 20, 2024
1 parent c2ce7f4 commit dcb43e1
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2283,13 +2283,15 @@ func pullImage(dockerClient *client.Client, imageName string, registrySpec *imag
// Try to obtain the auth configuration from the docker config file
authConfig, err := GetAuthFromDockerConfig(imageName)
if err != nil {
logrus.Errorf("An error occurred while getting auth config for image: %s: %s", imageName, err.Error())
logrus.Warnf("An error occurred while getting auth config for image: %s: %s", imageName, err.Error())
logrus.Warnf("Falling back to pulling image with no auth config.")
}

if authConfig != nil {
authFromConfig, err := registry.EncodeAuthConfig(*authConfig)
if err != nil {
logrus.Errorf("An error occurred while encoding auth config for image: %s: %s", imageName, err.Error())
logrus.Warnf("An error occurred while encoding auth config for image: %s: %s", imageName, err.Error())
logrus.Warnf("Falling back to pulling image with no auth config.")
} else {
imagePullOptions.RegistryAuth = authFromConfig
}
Expand Down

0 comments on commit dcb43e1

Please sign in to comment.