summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-11-13 13:10:48 +0100
committerGitHub <noreply@github.com>2021-11-13 13:10:48 +0100
commit8f3fb743ee57964594b36fdffb7b8fc5e3ca3371 (patch)
tree7ed656fefe7ed96a7c8484d774d901d625a420ae /cmd/podman
parent78bc2390f4d03ef4b179b129c69b5332c30692ce (diff)
parent6762d5e2381d79c26ecabac8c83d31d1f49e1325 (diff)
downloadpodman-8f3fb743ee57964594b36fdffb7b8fc5e3ca3371.tar.gz
podman-8f3fb743ee57964594b36fdffb7b8fc5e3ca3371.tar.bz2
podman-8f3fb743ee57964594b36fdffb7b8fc5e3ca3371.zip
Merge pull request #12270 from rhatdan/auth
--authfile command line argument for image sign command.
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/images/sign.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/podman/images/sign.go b/cmd/podman/images/sign.go
index 96f214d0b..4c42a0bd6 100644
--- a/cmd/podman/images/sign.go
+++ b/cmd/podman/images/sign.go
@@ -3,6 +3,7 @@ package images
import (
"os"
+ "github.com/containers/common/pkg/auth"
"github.com/containers/common/pkg/completion"
"github.com/containers/podman/v3/cmd/podman/common"
"github.com/containers/podman/v3/cmd/podman/registry"
@@ -48,6 +49,10 @@ func init() {
flags.StringVar(&signOptions.CertDir, certDirFlagName, "", "`Pathname` of a directory containing TLS certificates and keys")
_ = signCommand.RegisterFlagCompletionFunc(certDirFlagName, completion.AutocompleteDefault)
flags.BoolVarP(&signOptions.All, "all", "a", false, "Sign all the manifests of the multi-architecture image")
+
+ authfileFlagName := "authfile"
+ flags.StringVar(&signOptions.Authfile, authfileFlagName, auth.GetDefaultAuthFile(), "Path of the authentication file. Use REGISTRY_AUTH_FILE environment variable to override")
+ _ = signCommand.RegisterFlagCompletionFunc(authfileFlagName, completion.AutocompleteDefault)
}
func sign(cmd *cobra.Command, args []string) error {