diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-06-03 19:43:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-03 19:43:56 +0200 |
commit | cbfb4980ce7d9e6ed1ea769d0f42c52e1ad0bffa (patch) | |
tree | a3e923a491ca37274c2509141d31657669202601 /cmd/podman | |
parent | df0141dc200fc55f750bd3d878b98d4af4110e03 (diff) | |
parent | cbca6253282cc76be74b3005da80b63de94a8180 (diff) | |
download | podman-cbfb4980ce7d9e6ed1ea769d0f42c52e1ad0bffa.tar.gz podman-cbfb4980ce7d9e6ed1ea769d0f42c52e1ad0bffa.tar.bz2 podman-cbfb4980ce7d9e6ed1ea769d0f42c52e1ad0bffa.zip |
Merge pull request #6469 from jwhonce/wip/auth
V2 Add support for ssh authentication methods
Diffstat (limited to 'cmd/podman')
-rw-r--r-- | cmd/podman/root.go | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/cmd/podman/root.go b/cmd/podman/root.go index 3796b8e27..59d536d0b 100644 --- a/cmd/podman/root.go +++ b/cmd/podman/root.go @@ -103,6 +103,11 @@ func persistentPreRunE(cmd *cobra.Command, args []string) error { cfg := registry.PodmanConfig() + // Help is a special case, no need for more setup + if cmd.Name() == "help" { + return nil + } + // Prep the engines if _, err := registry.NewImageEngine(cmd, args); err != nil { return err @@ -150,6 +155,11 @@ func persistentPostRunE(cmd *cobra.Command, args []string) error { // TODO: Remove trace statement in podman V2.1 logrus.Debugf("Called %s.PersistentPostRunE(%s)", cmd.Name(), strings.Join(os.Args, " ")) + // Help is a special case, no need for more cleanup + if cmd.Name() == "help" { + return nil + } + cfg := registry.PodmanConfig() if cmd.Flag("cpu-profile").Changed { pprof.StopCPUProfile() @@ -191,8 +201,11 @@ func loggingHook() { func rootFlags(opts *entities.PodmanConfig, flags *pflag.FlagSet) { // V2 flags - flags.StringVarP(&opts.Uri, "remote", "r", registry.DefaultAPIAddress(), "URL to access Podman service") - flags.StringSliceVar(&opts.Identities, "identity", []string{}, "path to SSH identity file") + flags.BoolVarP(&opts.Remote, "remote", "r", false, "Access remote Podman service (default false)") + // TODO Read uri from containers.config when available + flags.StringVar(&opts.Uri, "url", registry.DefaultAPIAddress(), "URL to access Podman service (CONTAINER_HOST)") + flags.StringSliceVar(&opts.Identities, "identity", []string{}, "path to SSH identity file, (CONTAINER_SSHKEY)") + flags.StringVar(&opts.PassPhrase, "passphrase", "", "passphrase for identity file (not secure, CONTAINER_PASSPHRASE), ssh-agent always supported") cfg := opts.Config flags.StringVar(&cfg.Engine.CgroupManager, "cgroup-manager", cfg.Engine.CgroupManager, "Cgroup manager to use (\"cgroupfs\"|\"systemd\")") |