Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

CODER_FIRST_* environment vars ignored forcoder login #4485

Closed
@hh

Description

@hh

ENV vars to set defaults forcoder login are ignored.

Note the email, password, and username provided via ENV vars show up in--help

ii@prerepair:~/sharingio/coder$ coder login -hAuthenticate with Coder deploymentUsage:  coder login <url> [flags]Flags:  -e, --email string      Specifies an email address to authenticate with.                          Consumes $CODER_EMAIL (default "hh@ii.coop")  -h, --help              help for login  -p, --password string   Specifies a password to authenticate with.                          Consumes $CODER_PASSWORD (default "ii")  -u, --username string   Specifies a username to authenticate with.                          Consumes $CODER_USERNAME (default "ii")

If the '-u' option is not provided (and it's currently not defaulting toCODER_USERNAME, tty detection is enabled and calling coder login without arguments fails.

Ideally setting these ENV vars would allow us to runcoder login and respect the ENV provided defaults. I'm also recommend removing theisTTY altogether.

https://github.com/coder/coder/blob/main/cli/login.go#L91-L94

if username == "" {                    if !isTTY(cmd) {                        return xerrors.New("the initial user cannot be created in non-interactive mode. use the API")                    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp