Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bash-4.4# zitiLogin Error: unknown flag: --cert #103

Closed
kevinlmadison opened this issue May 11, 2023 · 3 comments
Closed

bash-4.4# zitiLogin Error: unknown flag: --cert #103

kevinlmadison opened this issue May 11, 2023 · 3 comments

Comments

@kevinlmadison
Copy link
Contributor

I'm seeing the following error when running the zitiLogin command in the ziti-controller container.

bash-4.4# zitiLogin
Error: unknown flag: --cert
Usage:
  ziti edge login my.controller.hostname[:port]/path [flags]

Flags:
      --ca string             additional root certificates used by the Ziti Edge Controller
  -i, --cli-identity string   Specify the saved identity you want the CLI to use when connect to the controller with
  -c, --client-cert string    A certificate used to authenticate
  -k, --client-key string     The key to use with certificate authentication
  -e, --ext-jwt string        A JWT from an external provider used to authenticate
  -h, --help                  help for login
      --ignore-config         If set, does not use value from the config file for hostname or username. Values must be entered or will be prompted for.
  -j, --output-json           Output the full JSON response from the Ziti Edge Controller
      --output-request-json   Output the full JSON request to the Ziti Edge Controller
  -p, --password string       password to use for authenticating to the Ziti Edge Controller, if -u is supplied and -p is not, a value will be prompted for
      --read-only             marks this login as read-only. Note: this is not a guarantee that nothing can be changed on the server. Care should still be taken!
      --timeout int           Timeout for REST operations (specified in seconds) (default 5)
  -t, --token string          if an api token has already been acquired, it can be set in the config with this option. This will set the session to read only by default
  -u, --username string       username to use for authenticating to the Ziti Edge Controller 
      --verbose               Enable verbose logging
  -y, --yes                   If set, responds to prompts with yes. This will result in untrusted certs being accepted or updated.


unknown flag: --cert

This is me looking at the zitiLogin script.

bash-4.4# which zitiLogin
/usr/local/bin/zitiLogin
bash-4.4# vim
bash-4.4# vim /usr/local/bin/zitiLogin 


ziti edge login "${ZITI_MGMT_API}" --yes \
  --username "${ZITI_ADMIN_USER}" \
  --password "${ZITI_ADMIN_PASSWORD}" \
  --cert "${ZITI_CTRL_PLANE_CA}/ctrl-plane-cas.crt"
@dovholuknf
Copy link
Member

what version of the container is running? That looks like the newest ziti cli where the --cert flag was replaced with --client-cert but I didn't think that was released yet.

Are you perhaps building the ziti cli? 0.27.9 still reports this usage:

Usage:
  ziti edge login my.controller.hostname[:port]/path [flags]

Flags:
  -c, --cert string           additional root certificates used by the Ziti Edge Controller

The next version of the CLI, version 0.28.0 will remove the --cert flag though.

Seems like maybe a container has a newer version

@dovholuknf
Copy link
Member

You can probably work around this entirely by using just:

ziti edge login "${ZITI_MGMT_API}" --yes \
  --username "${ZITI_ADMIN_USER}" \
  --password "${ZITI_ADMIN_PASSWORD}"

instead of the zitiLogin alias

@kevinlmadison
Copy link
Contributor Author

Ah I see, yeah I was using the wrong image!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants