Closed JulienDeveaux closed 1 year ago
You may try to use the following plugin settings for LSP-copilot:
"env": {
"NODE_TLS_REJECT_UNAUTHORIZED": "0",
},
Still the same error :/
My config file:
{
"env": {
"NODE_TLS_REJECT_UNAUTHORIZED": "0",
},
"command": [
"${node_bin}",
"${server_path}",
"--stdio"
],
"schemes": [
"file",
"buffer",
"res"
],
"settings": {
"auto_ask_completions": true,
"debug": true,
"hook_to_auto_complete_command": false,
"local_checks": false,
"telemetry": false,
"completion_style": "popup"
},
// ST4 configuration
"selector": "source | text | embedding"
}
LSP logs:
LSP-copilot: (node:3496) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
LSP-copilot: (Use `node.EXE --trace-warnings ...` to show where the warning was created)
:: <- LSP-copilot LogMessage: {'message': '[DEBUG] [agent] [2022-11-07T13:04:24.896Z] Telemetry initialized', 'metadataStr': '[DEBUG] [agent] [2022-11-07T13:04:24.896Z]', 'level': 0, 'extra': ['Telemetry initialized']}
:: <<< LSP-copilot 3: 'OK'
:: <<< LSP-copilot 2: {'status': 'NotSignedIn'}
:: --> LSP-copilot signInInitiate(4): {}
:: <<< LSP-copilot 4: {'verificationUri': 'https://github.com/login/device', 'status': 'PromptUserDeviceFlow', 'userCode': '02C9-DE8E', 'expiresIn': 899, 'interval': 5}
:: --> LSP-copilot signInConfirm(5): {'userCode': '02C9-DE8E'}
LSP-copilot: unhandledRejection {"type":"system","errno":"UNABLE_TO_GET_ISSUER_CERT_LOCALLY","code":"UNABLE_TO_GET_ISSUER_CERT_LOCALLY"}
The other env
would be to use NODE_EXTRA_CA_CERTS="absolute_path_to_your_certificates.pem"
yet another to try:
"command": [
"${node_bin}",
"${server_path}",
"--use-bundled-ca",
"--stdio"
],
I tryed the new command but it has the same issue.
For the env environment I'm in trouble as I don't know where to get the pem file
For the env environment I'm in trouble as I don't know where to get the pem file
may use the one from cURL: https://curl.se/ca/cacert.pem
I already tryed this one and one generated from the openssl command but I am in a corporate network under zscaler so I think it has specific certificates
what if run npm -g config set strict-ssl false
in cmd/powershell and restart ST ?
Doesn't change with npm -g config set strict-ssl false
It looks like there is a ZscalerRootCertificate-2048-SHA256.crt
file somewhere.
Yeah but the NODE_EXTRA_CA_CERTS="absolute_path_to_your_certificates.pem"
take a .pem file not a crt :/
Yeah but the
NODE_EXTRA_CA_CERTS="absolute_path_to_your_certificates.pem"
take a .pem file not a crt :/
It seems fine with .crt too.
It's indeed working 🎉🎉
Thank you a lot ^^
Hi,
I have trouble logging to copilot because of my corporate network messing up SSL certificate checks.
Here are the logs of LSP