zbirenbaum / copilot.lua

Fully featured & enhanced replacement for copilot.vim complete with API for interacting with Github Copilot
MIT License
2.45k stars 67 forks source link

Auth failing due to self signed certificate in chain #174

Closed thomascrha closed 1 year ago

thomascrha commented 1 year ago

Were I work we have a man in the middle SSL 'security' feature built into our laptops. This requires trusting any self signed certs being used. I run neovim using WSL on windows and have added the cert to the default path /etc/ssl/certs - and have apt curl git and other packages to work with certificates - so from what i can tell is that node doesn't adhere to these settings. I found that the copilot.vim project has an option for doing exactly this - is this also implemented in this project or is there a way to provide this flag also ?

https://github.com/github/copilot.vim/blob/1358e8e45ecedc53daf971924a0541ddf6224faf/doc/copilot.txt#L85

Sorry I accidently opened this issue in the cmp repo (https://github.com/zbirenbaum/copilot-cmp/issues/73)

thomascrha commented 1 year ago

I was able to fix this issue by setting NODE_EXTRA_CA_CERTS to my cert bundle and it now works fine

MunifTanjim commented 1 year ago

I found that the copilot.vim project has an option for doing exactly this - is this also implemented in this project or is there a way to provide this flag also ?

This plugin supports the same variable. You can just set:

vim.g.copilot_proxy_strict_ssl = false

Before calling require("copilot").setup()