Skip to content

Commit

Permalink
Merge pull request #1445 from mtrmac/log-not-found-paths
Browse files Browse the repository at this point in the history
Log every credential path we consult
  • Loading branch information
mtrmac authored Jan 18, 2022
2 parents d9c79d3 + abe1728 commit 05b2244
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/docker/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,7 @@ func findCredentialsInFile(key, registry, path string, legacyFormat bool) (types
// This intentionally uses "registry", not "key"; we don't support namespaced
// credentials in helpers.
if ch, exists := auths.CredHelpers[registry]; exists {
logrus.Debugf("Looking up in credential helper %s based on credHelpers entry in %s", ch, path)
return getAuthFromCredHelper(ch, registry)
}

Expand Down Expand Up @@ -703,6 +704,9 @@ func findCredentialsInFile(key, registry, path string, legacyFormat bool) (types
}
}

// Only log this if we found nothing; getCredentialsWithHomeDir logs the
// source of found data.
logrus.Debugf("No credentials matching %s found in %s", key, path)
return types.DockerAuthConfig{}, nil
}

Expand Down

0 comments on commit 05b2244

Please sign in to comment.