How to provide credentials when running flux against v2 DB?


I’ve setup a new v2 Influx DB instance (and was required to specify user name and password), but cannot connect to the DB using flux. How do I provide credentials in flux? Is there a command line option for this?

flux repl
> from(bucket:"nec") |> range(start: -1h)
Result: _result
Error: unauthorized access
> buckets()
Error: listing buckets from a remote host requires an organization to be set

Hello @nekrassov,
Please see this documentation for an example. Thank you : )


Is it possible to reference this configuration without providing it with every query?
In my configs I have “[default]” entry; can it be used by default? :wink: