Is there any way to login through the
# general
e
Is there any way to login through the coder CLI? Currently have a script to sync templates to coder but this obviously requires a token or being logged in. If I go the token route it will expire at some point which means I have to manually update it at some point. So can I either a) disable token expiry or b) login through CLI by specifying a user and password
k
Yup!
coder login
accepts
CODER_FIRST_USER_EMAIL
and
CODER_FIRST_USER_PASSWORD
. We should probably change these to remove
FIRST_
though.
e
It doesn't seem to work. Regardless of passing those fields it just opens the browser and asks me to login
I think those fields only work upon initial creation like the documentation describes
It would be great if I am just doing something wrong and it works for you
I tried this
coder login http://coder.domain.com --first-user-email admin@example.com --first-user-password randomPassword
j
would it be possible to use a OIDC token from a configured OIDC provider here? Like this mechanism: https://docs.gitlab.com/ee/ci/secrets/id_token_authentication.html It contains for example the
user_email
of the user triggering the pipeline.
3 Views