Skip to content

Unknown option --no-auth #4009

Closed
Closed

Description

@markgarrigan

Values.yaml

# Optional additional arguments
extraArgs:
#  - --allow-http
  - --no-auth

Steps to Reproduce

  1. Uncomment the Extra Argument for --no-auth in the helm-chart/values.yaml file
  2. Install the Helm chart

Expected

Chart should install and code-server should not require a password

Actual

Chart installs but the code-server pod is in error

Logs

$ k logs code-server-694b6f4b98-j6srk -f
[2021-08-19T17:51:09.606Z] error Unknown option --no-auth

Activity

  1. jawnsy commented on Aug 21, 2021

    @jawnsy

    Hey there,

    Thanks so much for this report! This looks like an issue with our Helm chart, and the solution is to use --auth none as the argument instead

  2. markgarrigan commented on Aug 23, 2021

    @markgarrigan
    Author

    Thanks @jawnsy

    That gives me this error...

    $ k logs code-server-7bdd679d-n6rxm -f
    [2021-08-23T15:06:46.843Z] error Unknown option --auth none
    
  3. jsjoeio commented on Aug 23, 2021

    @jsjoeio
    Contributor

    Hmm...I'm not as familiar with the Helm side of code-server but to not require a password, you can either do

    code-server --auth none

    or put it in the config.yaml

    auth: none

    Maybe this is a bug in how we have the Helm chart configured?

  4. jawnsy commented on Aug 23, 2021

    @jawnsy

    I tried this with the chart and got things working:

    # Optional additional arguments
    extraArgs:
      - --auth
      - none
    

    This is what my logs look like:

    $ kubectl logs code-server-6dd6f4d574-pqvlf
    [2021-08-23T23:38:01.088Z] info  Wrote default config file to ~/.config/code-server/config.yaml
    [2021-08-23T23:38:01.519Z] info  code-server 3.11.1 acb5de66b71a3f8f1cc065df4633ecd3f9788d46
    [2021-08-23T23:38:01.520Z] info  Using user-data-dir ~/.local/share/code-server
    [2021-08-23T23:38:01.536Z] info  Using config file ~/.config/code-server/config.yaml
    [2021-08-23T23:38:01.537Z] info  HTTP server listening on http://0.0.0.0:8080 
    [2021-08-23T23:38:01.537Z] info    - Authentication is disabled 
    [2021-08-23T23:38:01.537Z] info    - Not serving HTTPS
    

    I think if you use "--auth none" on a single line, then it gets passed to code-server as if you typed code-server "--auth none" (quoting the parameter), which confuses the command line parser. You can also try that on your command line:

    $ code-server "--auth none"
    [2021-08-23T23:41:07.797Z] error Unknown option --auth none
    [2021-08-23T23:41:07.799Z] debug parent:6532 disposing {}
    
  5. markgarrigan commented on Aug 24, 2021

    @markgarrigan
    Author

    Thanks @jawnsy! That worked!

  6. added this to the 3.12.0 milestone on Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions