Unable to execute influx CLI commands

Hi,

I installed influxdb-2.0.4 Docker version. It’s working fine when accessing it via UI (URL), but I can’t quey it via CLI.

i.e. executing a influx org list, I get the error below:

$ docker exec -it <container_id> influx org list
Error: Failed find orgs: attempted to unmarshal error as JSON but failed: "invalid character 'C' looking for beginning of value": Client sent an HTTP request to an HTTPS server.
Error: Attempted to unmarshal error as JSON but failed: "invalid character 'C' looking for beginning of value": Client sent an HTTP request to an HTTPS server.
See 'influx org list -h' for help

Any help would be appreciated,
Thanks

docker exec <CONTAINER_ID> influx org list -t YOUR_TOKEN

Hi @srbp ,
Yeah I tried passing the token, but I still get errors (below):

Error: Failed find orgs: attempted to unmarshal error as JSON but failed: "invalid character 'C' looking for beginning of value": Client sent an HTTP request to an HTTPS server.
Error: Attempted to unmarshal error as JSON but failed: "invalid character 'C' looking for beginning of value": Client sent an HTTP request to an HTTPS server.
See 'influx org list -h' for help

Indeed, by server runs over HTTPS, and I didn’t figure out why this message saying CLI sending it over HTTP.