summaryrefslogtreecommitdiff
path: root/cmd/podman/images/push.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-11-23 09:50:26 -0500
committerGitHub <noreply@github.com>2021-11-23 09:50:26 -0500
commitee612806655d0d0a0a3d2a782a000ea5c6b08f33 (patch)
tree6a5ef0988a7642d83c0e7d095f89f552cccc8551 /cmd/podman/images/push.go
parent9e07cb17a92dd24df8053193e1e047f211a72a54 (diff)
parent21629b0501c62a991eef536765b7320bc2d45763 (diff)
downloadpodman-ee612806655d0d0a0a3d2a782a000ea5c6b08f33.tar.gz
podman-ee612806655d0d0a0a3d2a782a000ea5c6b08f33.tar.bz2
podman-ee612806655d0d0a0a3d2a782a000ea5c6b08f33.zip
Merge pull request #12361 from rhatdan/remote
podman-remote does not support signature-policy
Diffstat (limited to 'cmd/podman/images/push.go')
-rw-r--r--cmd/podman/images/push.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd/podman/images/push.go b/cmd/podman/images/push.go
index a13976612..cf787a71f 100644
--- a/cmd/podman/images/push.go
+++ b/cmd/podman/images/push.go
@@ -101,7 +101,6 @@ func pushFlags(cmd *cobra.Command) {
flags.BoolVarP(&pushOptions.Quiet, "quiet", "q", false, "Suppress output information when pushing images")
flags.BoolVar(&pushOptions.RemoveSignatures, "remove-signatures", false, "Discard any pre-existing signatures in the image")
- flags.StringVar(&pushOptions.SignaturePolicy, "signature-policy", "", "Path to a signature-policy file")
signByFlagName := "sign-by"
flags.StringVar(&pushOptions.SignBy, signByFlagName, "", "Add a signature at the destination using the specified key")
@@ -117,7 +116,10 @@ func pushFlags(cmd *cobra.Command) {
_ = flags.MarkHidden("remove-signatures")
_ = flags.MarkHidden("sign-by")
}
- _ = flags.MarkHidden("signature-policy")
+ if !registry.IsRemote() {
+ flags.StringVar(&pushOptions.SignaturePolicy, "signature-policy", "", "Path to a signature-policy file")
+ _ = flags.MarkHidden("signature-policy")
+ }
}
// imagePush is implement the command for pushing images.