Skip to content

code-server --cert fails and code-server --cert "" starts the server without SSL #1101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wpitallo opened this issue Oct 24, 2019 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@wpitallo
Copy link

When I run code-server --cert it fails and code-server --cert "" starts the server without SSL?

How should we properly enable SSL using self signed cert?

image

@wpitallo wpitallo added the bug Something isn't working label Oct 24, 2019
@code-asher
Copy link
Member

code-asher commented Oct 24, 2019

v1 handles the cert flag differently than v2.

In v1 if you leave off the cert flag it'll generate a self-signed certificate.

In v2 it won't generate a certificate unless you explicitly tell it to by passing the cert flag (so basically it reverses the behavior).

I recommend using v2 if you can.

@wpitallo
Copy link
Author

Thanks @code-asher i tiried this tho code-server --cert but i receive "argument missing" error when i try this?

@code-asher
Copy link
Member

Would you be able to try v2 instead? https://github.com/cdr/code-server/releases/tag/2.1638-vsc1.39.2

If you need to stick with v1 then drop the --cert flag and it should work.

@elgandoz
Copy link

elgandoz commented Oct 25, 2019

Maybe I'm doing something wrong but I'm running the latest 2.1638-vsc1.39.2 like this:

code-server --auth password --cert --port 8443

But that's the output:

info  Server listening on http://localhost:8443
info    - Using custom password for authentication
info    - Not serving HTTPS

I also wiped my ~/local/share/code-server and I can see that the certificate doesn't get generated.
The empty --cert parameter was generating the certificate in the previous version I was using (2.1523-vsc1.38.1)

@elgandoz
Copy link

@code-asher

@wpitallo
Copy link
Author

wpitallo commented Oct 25, 2019

Hi @code-asher

Get a similar result when I try with :v2

image

@code-asher
Copy link
Member

Ah you're right something happened to the latest version of v2.

@code-asher
Copy link
Member

It seems VS Code's parser changed to filter out empty string arguments. Thanks for the bug report! ❤️ We'll have a new version released by end of day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants