podman_image: Use provided credentials when pulling image (#66372)
* Use credentials when pulling from a remote registry
This commit is contained in:
parent
1cb634a3ab
commit
d5c5cb5a17
2 changed files with 6 additions and 0 deletions
|
@ -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…
Reference in a new issue