Skip to content
This repository was archived by the owner on Oct 10, 2020. It is now read-only.

Commit 0435127

Browse files
giusepperh-atomic-bot
authored andcommitted
util: skopeo_copy supports src_creds
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com> Closes: #1120 Approved by: ashcrow
1 parent c4c3f83 commit 0435127

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Atomic/util.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ def skopeo_manifest_digest(manifest_file, debug=False):
402402
return check_output(cmd).rstrip().decode()
403403

404404
def skopeo_copy(source, destination, debug=False, sign_by=None, insecure=False, policy_filename=None,
405-
username=None, password=None, gpghome=None, dest_ostree_tmp_dir=None):
405+
username=None, password=None, gpghome=None, dest_ostree_tmp_dir=None, src_creds=None):
406406

407407
cmd = [SKOPEO_PATH]
408408
if policy_filename:
@@ -421,6 +421,9 @@ def skopeo_copy(source, destination, debug=False, sign_by=None, insecure=False,
421421
elif destination.startswith("atomic") and not sign_by:
422422
cmd = cmd + ['--remove-signatures']
423423

424+
if src_creds:
425+
cmd = cmd + ['--src-creds', src_creds]
426+
424427
if sign_by:
425428
cmd = cmd + ['--sign-by', sign_by]
426429

0 commit comments

Comments
 (0)