Implement #4 - fix password via CLI#5
Conversation
| version: flags.version({ char: "v" }), | ||
| "no-auth": flags.boolean({ default: false }), | ||
| "allow-http": flags.boolean({ default: false }), | ||
| password: flags.string(), |
There was a problem hiding this comment.
We could generate the password here and add it as a default. What do you think?
There was a problem hiding this comment.
@kylecarbs for non interactive env's a flag should be provided I think
There was a problem hiding this comment.
@kylecarbs Maybe, but in this case, code-server --help will print always a random password as a default value for --password argument, won't it?
andreimc
left a comment
There was a problem hiding this comment.
👍 for this I was thinking of adding it, it’s needed
| chars.push(possible[Math.floor(Math.random() * possible.length)]); | ||
| let password = flags["password"]; | ||
| if (!password) { | ||
| // Generate a random password |
There was a problem hiding this comment.
Unrelated issue but this needs to be changed. The password should generated from a CPRNG.
There was a problem hiding this comment.
This PR is only related to adding a static password feature, not changing original password generation method.
There was a problem hiding this comment.
For those reading this thread, aforementioned issue is located at #26
Add
--password=123456CLI argument to use fix password instead of random.@kylecarbs Currently I'm on Windows so I can't test it but I hope the code is correct. Maybe could you try it?