Hi,
I open the ACL on the server and client. In the client, I am trying to get the kv in the server with token:
consul kv get mysql -token=testtoken
However, I get this:
Too many arguments (expected 1, got 2)
Am I missing anything here?
Thanks
Yuxuan
blake
2
Hi @cheyuxuanll,
The correct syntax for consul kv get
is documented in the help output for the CLI command, and on the website at https://www.consul.io/commands/kv/get#usage.
$ consul kv get --help
Usage: consul kv get [options] [KEY_OR_PREFIX]
…
The options need to be specified before the key you are attempting to retrieve. In your particular scenario, the correct command syntax would be:
$ consul kv get -token=testtoken mysql
I hope this helps.
1 Like