confluent-cli icon indicating copy to clipboard operation
confluent-cli copied to clipboard

Misleading error output when not logged in

Open aaronkao opened this issue 2 years ago • 1 comments

I tried to run this command

confluent kafka topic produce "$(pulumi stack output ordersTopicName)" --environment "$(pulumi stack output environmentId)" --cluster "$(pulumi stack output clusterId)" --api-key "$(pulumi stack output producerApiKeyId)" --api-secret "$(pulumi stack output producerApiKeySecret --show-secrets)"

and I got this as the error output

Error: unknown flag: --environment
Usage:
  confluent kafka topic produce <topic> [flags]

Examples:
Produce message to topic "my_topic" with SASL_SSL/PLAIN protocol (providing username and password).

  $ confluent kafka topic produce my_topic --protocol SASL_SSL --sasl-mechanism PLAIN --bootstrap "localhost:19091" --username user --password secret --ca-location my-cert.crt

Produce message to topic "my_topic" with SSL protocol, and SSL verification enabled.

  $ confluent kafka topic produce my_topic --protocol SSL --bootstrap "localhost:18091" --ca-location my-cert.crt

I hadn't logged in using confluent login. The expected error output should have been to request me to login.

aaronkao avatar Feb 28 '23 21:02 aaronkao

Thank you for posting this, tripped me up for about 45 minutes this morning.

mswanson-mastery avatar Sep 29 '23 14:09 mswanson-mastery