We decided to remove the flag and opt-in via the options from Podman.
This means we do not need the flags any more, but keep the configuration
itself.
Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
We now add a new configuration option to opt-in for path based registry
authentication in containers-auth.json. This affects login and logout,
which means if the option is enabled we can now use
`my-registry.local/path/to/image` to save or remove the credentials from
the auth.json.
If the option is enabled, then we enforce a stricter validation of the
input. For example it is not allowed input `http[s]://` prefixed keys.
Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
The PR containers/podman#6442 enables a new way to create
shell completions scripts. The shell completion is handled
by cobra and since the login/logout flags are defined here
the completion functions for this should be defined here
as well. For Reference see:
https://github.com/spf13/cobra/blob/master/shell_completions.md
I added a unit test to ensure that the flags have a
completion function set.
This could also be used by skopeo and buildah if
someone wants to implement such completions for them.
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
Alternatively, it is very tempting to make them completely private
instead. This makes the code usable by callers that don't use
cobra (but they would still drag in the dependency).
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
There seems to be no reason to move that to callers
Also clarify what the callers should do about --tls-verify.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>