Skip to content
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

PKIX path building failed #116

Closed
0815pascal opened this issue Mar 16, 2023 · 4 comments
Closed

PKIX path building failed #116

0815pascal opened this issue Mar 16, 2023 · 4 comments

Comments

@0815pascal
Copy link

Since one of the most recent plugin-updates I'm receiving an error-message when trying to use GPT-3.5-Turbo:

GPT 3.5 Turbo Request failure, cause: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: 
unable to find valid certification path to requested target

Now I'm not sure if this is related due to some configuration problems on my side (I haven't changed anything recently though and before it worked) or if it's related to the updates. Reporting it here to be sure though. And thanks a lot by the way for bringing ChatGPT to IntelliJ :)

@obiscr
Copy link
Owner

obiscr commented Mar 16, 2023

Thanks for the feedback. First time I've encountered this issue. This looks like it is due to a problem with the OpenAI server.

At this moment, I am using it normally. Can you try changing the apiKey or changing the network environment and then request again to see if the error is still there?

@NargiT
Copy link

NargiT commented Mar 16, 2023

hello I have the same issue, as my company uses an internal certificates (on ubuntu).

GPT 3.5 Turbo Request failure, cause: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

It looks like there is no way to use a self signed certificate: https://www.baeldung.com/okhttp-self-signed-cert

https://github.com/dromara/ChatGPT/blob/738b7e58786fee6994fe8a52b528746a9b00e92b/src/main/java/com/obiscr/chatgpt/GPT35TurboHandler.java#L39-L44

@NargiT
Copy link

NargiT commented Mar 16, 2023

I was able to fix this by adding the certificate to the internal intellij jre

keytool -noprompt -keystore ~/.local/share/JetBrains/Toolbox/cacerts -import -trustcacerts -file /usr/local/share/ca-certificates/YOUR_CERT.crt -alias uniq name -storepass STORE_PASSWORD

@obiscr
Copy link
Owner

obiscr commented Mar 17, 2023

@NargiT Thank you very much for the solution.

obiscr added a commit that referenced this issue Mar 26, 2023
obiscr added a commit that referenced this issue Mar 26, 2023
obiscr added a commit that referenced this issue Mar 26, 2023
obiscr added a commit that referenced this issue Mar 26, 2023
obiscr added a commit that referenced this issue Mar 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants