Skip to content

[Bug]: --cert does not work on Windows #6022

Closed as not planned
Closed as not planned
@sun-rs

Description

@sun-rs

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser: Edge
  • Local OS: Win11
  • Remote OS: Android
  • Remote Architecture:
  • code-server --version: 4.9.1

Steps to Reproduce

  1. run code-server --port 8090 --host 0.0.0.0 works well but only jupyter notebook not work. So try https.
  2. run code-server --port 8090 --host 0.0.0.0 --cert ../san_domain_com.crt --cert-key ../san_domain_com.key
  3. open https url in browser

Expected

Enter the password and then show vscode gui

Actual

The page is blank empty and powershell get some error.

Logs

[2023-02-15T08:06:43.351Z] info  code-server 4.9.1 f7989a4dfcf21085e52157a01924d79d708bcc05
[2023-02-15T08:06:43.352Z] info  Using user-data-dir ~\AppData\Local\code-server\Data
[2023-02-15T08:06:43.372Z] info  Using config file ~\AppData\Roaming\code-server\Config\config.yaml
[2023-02-15T08:06:43.372Z] info  HTTPS server listening on https://0.0.0.0:8080/
[2023-02-15T08:06:43.372Z] info    - Authentication is enabled
[2023-02-15T08:06:43.372Z] info      - Using password from ~\AppData\Roaming\code-server\Config\config.yaml
[2023-02-15T08:06:43.372Z] info    - Using certificate for HTTPS: D:\SUN\web\san_domain_com.crt
[16:07:03]




[16:07:03] Extension host agent started.
[2023-02-15T08:07:04.413Z] error child:91736 Uncaught exception: listen EACCES: permission denied C:\Users\cceva\AppData\Local\Temp\code-server\tls-proxy
[2023-02-15T08:07:04.413Z] error child:91736 Error: listen EACCES: permission denied C:\Users\cceva\AppData\Local\Temp\code-server\tls-proxy
    at Server.setupListenHandle [as _listen2] (node:net:1446:21)
    at listenInCluster (node:net:1511:12)
    at Server.listen (node:net:1610:5)
    at C:\Users\cceva\AppData\Roaming\nvm\v16.19.0\node_modules\code-server\out\node\socket.js:114:37
    at new Promise (<anonymous>)
    at C:\Users\cceva\AppData\Roaming\nvm\v16.19.0\node_modules\code-server\out\node\socket.js:111:28
[16:07:04] Error: listen EACCES: permission denied C:\Users\cceva\AppData\Local\Temp\code-server\tls-proxy
    at Server.setupListenHandle [as _listen2] (node:net:1446:21)
    at listenInCluster (node:net:1511:12)
    at Server.listen (node:net:1610:5)
    at C:\Users\cceva\AppData\Roaming\nvm\v16.19.0\node_modules\code-server\out\node\socket.js:114:37
    at new Promise (<anonymous>)
    at C:\Users\cceva\AppData\Roaming\nvm\v16.19.0\node_modules\code-server\out\node\socket.js:111:28 {
  code: 'EACCES',
  errno: -4092,
  syscall: 'listen',
  address: 'C:\\Users\\cceva\\AppData\\Local\\Temp\\code-server\\tls-proxy',
  port: -1
}

Screenshot/Video

No response

Does this issue happen in VS Code or GitHub Codespaces?

  • I cannot reproduce this in VS Code.
  • I cannot reproduce this in GitHub Codespaces.

Are you accessing code-server over HTTPS?

  • I am using HTTPS.

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingos-windowsWindows relatedtriageThis issue needs to be triaged by a maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions