gencay / vscode-chatgpt

An unofficial Visual Studio Code - OpenAI ChatGPT integration
ISC License
3.5k stars 755 forks source link

API Key error: certificate has expired #145

Closed welove closed 1 year ago

welove commented 1 year ago

Hi

When using API Key, I keep getting this error message: request to https://api.openai.com/v1/completions failed, reason: certificate has expired

Already generated new keys, uninstalled the plugin, closed vs code, but the issue remains. Any solution for this?

When I use the browser login, it works, but I have to login again every time I open VS Code!

gencay commented 1 year ago

Could you check this answer and see if this resolves your issue?

https://github.com/gencay/vscode-chatgpt/issues/77#issuecomment-1409346121

welove commented 1 year ago

Hello, thank thy for your reply, but adding those preferences made no difference in my case. Don't know if it helps, but I'm using macOS Ventura

mrsingh3131 commented 1 year ago

I am facing the very same issue in an otherwise perfect extension. Kindly help

Rock-son commented 1 year ago

Hello, thank thy for your reply, but adding those preferences made no difference in my case. Don't know if it helps, but I'm using macOS Ventura

I'm using macOS High Sierra (v10.13) and had the same problem, though later found out the VSCode wasn't reloaded after installing the extension. After that, it worked.

gencay commented 1 year ago

@Rock-son interesting. Perhaps a restart could help others, too. the certificate issue isn't something due to the extension as far as I can tell but about the machine and its trusted certificate store.

mrsingh3131 commented 1 year ago

@Rock-son tried restarting too but it wasn't the case and I still am facing the same issue. Thanks though

Rock-son commented 1 year ago

@gencay you are correct, I found this answer which should help with similar problems in the future or at least until the vscode electron is bumbed up to v16: https://github.com/microsoft/vscode/issues/136787#issuecomment-969065291 @mrsingh3131 I think this will work for you.

welove commented 1 year ago

@gencay you are correct, I found this answer which should help with similar problems in the future or at least until the vscode electron is bumbed up to v16: microsoft/vscode#136787 (comment) @mrsingh3131 I think this will work for you.

thank you @Rock-son Adding this to the User Settings (JSON) solved the issue for me:

"http.systemCertificates": false

mrsingh3131 commented 1 year ago

You guys are awesome @gencay @Rock-son This worked for me too