How to provide credentials when running flux against v2 DB?

Hi,

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?
Thanks,
Alex

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,
Welcome!
Please see this documentation for an example. Thank you : )

Thanks!

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: