mirror of
https://github.com/containers/skopeo.git
synced 2025-09-19 00:46:17 +00:00
fix creds sync from yaml
Pass down the creds from yaml file only if the values are not empty. Enables to use credentials from other authfiles alternatively. Signed-off-by: Qi Wang <qiwan@redhat.com>
This commit is contained in:
@@ -280,8 +280,9 @@ func imagesToCopyFromRegistry(registryName string, cfg registrySyncConfig, sourc
|
||||
serverCtx.DockerDaemonCertPath = cfg.CertDir
|
||||
serverCtx.DockerDaemonInsecureSkipTLSVerify = (cfg.TLSVerify.skip == types.OptionalBoolTrue)
|
||||
serverCtx.DockerInsecureSkipTLSVerify = cfg.TLSVerify.skip
|
||||
serverCtx.DockerAuthConfig = &cfg.Credentials
|
||||
|
||||
if cfg.Credentials != (types.DockerAuthConfig{}) {
|
||||
serverCtx.DockerAuthConfig = &cfg.Credentials
|
||||
}
|
||||
var repoDescList []repoDescriptor
|
||||
for imageName, refs := range cfg.Images {
|
||||
repoLogger := logrus.WithFields(logrus.Fields{
|
||||
|
Reference in New Issue
Block a user