podman_image: Use provided credentials when pulling image (#66372)

* Use credentials when pulling from a remote registry
pull/65381/head
Patrick Easters 5 years ago committed by Sam Doran
parent 1cb634a3ab
commit d5c5cb5a17

@ -0,0 +1,2 @@
bugfixes:
- podman_image - honor username and password options when pulling image from a remote registry

@ -489,6 +489,10 @@ class PodmanImageManager(object):
if self.auth_file:
args.extend(['--authfile', self.auth_file])
if self.username and self.password:
cred_string = '{user}:{password}'.format(user=self.username, password=self.password)
args.extend(['--creds', cred_string])
if self.validate_certs:
args.append('--tls-verify')

Loading…
Cancel
Save