summaryrefslogtreecommitdiff
path: root/cmd/podman/login.go
Commit message (Collapse)AuthorAge
* bump containers/image to v5.0.0, buildah to v1.11.4Nalin Dahyabhai2019-10-29
| | | | | | | | | Move to containers/image v5 and containers/buildah to v1.11.4. Replace an equality check with a type assertion when checking for a docker.ErrUnauthorizedForCredentials in `podman login`. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
* Update c/image to v4.0.1 and buildah to 1.11.3Miloslav Trmač2019-10-04
| | | | | | | | | | | | | | This requires updating all import paths throughout, and a matching buildah update to interoperate. I can't figure out the reason for go.mod tracking github.com/containers/image v3.0.2+incompatible // indirect ((go mod graph) lists it as a direct dependency of libpod, but (go list -json -m all) lists it as an indirect dependency), but at least looking at the vendor subdirectory, it doesn't seem to be actually used in the built binaries. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
* podman: create and run honors auth file locationGiuseppe Scrivano2019-07-09
| | | | | | | | if the auth file was overriden, be sure create and run honors it. Closes: https://github.com/containers/libpod/issues/3524 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* Merge pull request #3108 from rhatdan/flagsOpenShift Merge Robot2019-05-22
|\ | | | | Fixup Flags
| * Fixup FlagsDaniel J Walsh2019-05-20
| | | | | | | | | | | | | | | | Mark hidden all references to signature-policy Default all uses of --authfile Add --authfile support to podman run and podman create. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Update vendor of buildah and containers/imagesDaniel J Walsh2019-05-20
|/ | | | | | | | | Mainly add support for podman build using --overlay mounts. Updates containers/image also adds better support for new registries.conf file. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* fix login supports credHelpers configQi Wang2019-04-25
| | | | | | Skip the error if login can't find credentials in credHelpers with credHelpers configed in auth.json and podman login will store the credentials in credHelpers later. Signed-off-by: Qi Wang <qiwan@redhat.com>
* Fix segfaults attribute to missing optionsbaude2019-04-15
| | | | | | | | | In cases where the remote client culls options to a command, we need to be sure that the lookup for that flag does not result in a nil pointer. To do so, we add a Remote attribute to the podman struct and then cli helper funcs are now aware they are remote. Signed-off-by: baude <bbaude@redhat.com>
* Set blob cache directory based on GraphDriverDaniel J Walsh2019-03-29
| | | | | | | | | | | | Currently in rootless containers, we end up not using the blob cache. We also don't store the blob cache based on the users specified graph storage. This change will cause the cache directory to be stored with the rest of the containe images. While doing this patch, I found that we had duplicated GetSystemContext in two places in libpod. I cleaned this up. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Usage messages: deduplicate '(default true)' et alEd Santiago2019-03-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove hardcoded '(default: true)' strings from bool flags, and '(default this-or-that)' from string flags. First because it's unmaintainable duplication that would cause confusion should someone ever change the default and not notice the message. Second, because cobra[1] already prints '(default XXXX)' for all options with non-false non-nil default. So in each of these cases, current podman help behavior is: $ podman login --help ... --tls-verify Require HTTPS ... (default: true) (default true) This PR eliminates that duplication. [1] actually spf13/pflag/flag.go The only nontrivial one of these is start.go, where the default for sigProxy depends on the --attach flag. Solution: change the command-line default to false, and implement the new conditional default in logic. Bonus: removed unnecessary check, because now if sigProxy is set without --attach, we can guarantee that it was done by the user. But please pay close scrutiny to this particular section in case there's something I missed. Signed-off-by: Ed Santiago <santiago@redhat.com>
* Fix help commands to show short and long description.Daniel J Walsh2019-03-07
| | | | | | Cleanup lots of help information to look good when displayed. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Better usage synopses for subcommandsEd Santiago2019-02-26
| | | | | | | Conceptually simple: include, where applicable, a brief description of command-line options for each subcommand. Signed-off-by: Ed Santiago <santiago@redhat.com>
* Merge pull request #2340 from QiWang19/login_lyingOpenShift Merge Robot2019-02-17
|\ | | | | Fix `podman login` lying problem
| * Fix `podman login` lying problemQi Wang2019-02-14
| | | | | | | | Signed-off-by: Qi Wang <qiwan@redhat.com>
* | Merge pull request #2333 from TomSweeneyRedHat/dev/tsweeney/helpexamplesOpenShift Merge Robot2019-02-15
|\ \ | |/ |/| Add examples for Cobra
| * Add examples for CobraTomSweeneyRedHat2019-02-14
| | | | | | | | | | | | | | Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com> First pass of entries for the Examples listed in the Cobra Help. Will add others in following PR's.
* | Merge pull request #2320 from QiWang19/stdinPWOpenShift Merge Robot2019-02-14
|\ \ | |/ |/| --password-stdin flag in `podman login`
| * --password-stdin flag in `podman login`Qi Wang2019-02-14
| | | | | | | | | | | | Support --password-stdin flag, reads a password from STDIN and pass it to `podman login`. Signed-off-by: Qi Wang <qiwan@redhat.com>
* | Don't show global flags except for podman commandDaniel J Walsh2019-02-12
| | | | | | | | | | | | | | | | | | Subcommands should not be showing the global flags. This causes the important information to scroll off the screen. Also fixed a typo on runCommmand (Too many 'm's) Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Separate remote and local commandsbaude2019-02-11
|/ | | | | | | | In the previous CLI, we had an accurate depiction of commands available for the remote client and those available for the local client. Signed-off-by: baude <bbaude@redhat.com>
* Migrate to cobra CLIbaude2019-02-08
| | | | | | | | We intend to migrate to the cobra cli from urfave/cli because the project is more well maintained. There are also some technical reasons as well which extend into our remote client work. Signed-off-by: baude <bbaude@redhat.com>
* podman-login: adhere to user inputValentin Rothberg2019-01-07
| | | | | | | | | | | | * Do not try to login with existing credentials when the user specifies a username or password on the CLI. * Improve error messages. * Use specified tls-verify switch and cert-dir for all requests. Fixes: #2092 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* add --get-login command to podman-login.Theodore Cowan2018-12-17
| | | | | | | Returns user if user is logged-in to the registry. Returns error if not logged in with non-zero status code. Signed-off-by: Theodore Cowan <theodore-cowan@pluralsight.com>
* Minimally update for the DockerInsecureSkipTLSVerify type changeMiloslav Trmač2018-12-06
| | | | | | | | | | | | | | | | | Following SystemContext.DockerInsecureSkipTLSVerify, make the DockerRegistryOne also an OptionalBool, and update callers. Explicitly document that --tls-verify=true and --tls-verify unset have different behavior in those commands where the behavior changed (or where it hasn't changed but the documentation needed updating). Also make the --tls-verify man page sections a tiny bit more consistent throughout. This is a minimal fix, without changing the existing "--tls-verify=true" paths nor existing manual insecure registry lookups. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
* Pick registry to login from full image name as wellUrvashi Mohnani2018-12-06
| | | | | | | | | | podman login reg.io/username/image works as well now. It picks the registry and checks for authentication, if none exist it will prompt for username and password. If the credentials exist but are not valid, it will prompt the user for new valid credentials. Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
* Handle http/https in registry given to login/outTomSweeneyRedHat2018-10-22
| | | | Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
* Support auth file environment variable & add change to man pagesQi Wang2018-10-12
| | | | Signed-off-by: Qi Wang <qiwan@redhat.com>
* Sort all command flagsQi Wang2018-10-11
| | | | Signed-off-by: Qi Wang <qiwan@redhat.com>
* don't print help message for usage errorsValentin Rothberg2018-08-31
| | | | | | | | | | | | | | | | | Don't print potentially verbose help messages in case of usage errors, but print only the usage error followed by a pointer to the command's help. This aligns with Docker. ``` $ podman run -h flag needs an argument: -h See 'podman run --help'. ``` Signed-off-by: Valentin Rothberg <vrothberg@suse.com> Closes: #1379 Approved by: rhatdan
* switch projectatomic to containersDaniel J Walsh2018-08-16
| | | | | | | | | | Need to get some small changes into libpod to pull back into buildah to complete buildah transition. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #1270 Approved by: mheon
* Cleanup descriptions and help informationDaniel J Walsh2018-07-27
| | | | | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #1167 Approved by: baude
* Fix build after c/image changesMatthew Heon2018-03-16
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #505 Approved by: rhatdan
* Fix --cert-dir path for podman loginumohnani82018-02-02
| | | | | | | | | | | podman login would add on the registry name to the cert-dir path making containers/image look in a directory that did not exist for certificates. Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #283 Approved by: rhatdan
* Touch up certs-dir verbiage a bitTomSweeneyRedHat2017-12-21
| | | | | | | Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com> Closes: #160 Approved by: rhatdan
* Add flag --cert-dir and --tls-verify to kpod loginSuraj Deshmukh2017-12-20
| | | | | | | | | | | | | This commit adds a mechanism to override the default certs dir by using command line flag `--cert-dir` for kpod login. Another flag `--tls-verify` is also added which lets you skip certificate validation when contacting container registry. Signed-off-by: Suraj Deshmukh <surajd.service@gmail.com> Closes: #75 Approved by: rhatdan
* Rename all references to kpod to podmanDaniel J Walsh2017-12-18
The decision is in, kpod is going to be named podman. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #145 Approved by: umohnani8