2023-01-25 there has been an issue with GitHub CoPilot plugin on Intellij (and other IDEs supporting GitHub
CoPilot as well) that if the machine had self-signed certificates (like in an office laptop) then it would throw
following error :
Sign in failed. Reason: Request signInInitiate failed with message: self signed certificate in certificate chain, request id: 3, error code: -32603
In this post I am proposing a fix that works fine as of
- Export the self-signed certificate in your respective OS. For example, in macOS, it would be present in
Certificatewhich you can right-click and export.
- Convert the certificate to
.pemformat. For example, if the certificate is in
.cerformat then you run this :
openssl x509 -inform der -in <exported_cert>.cer -out mycert.pem
NODE_EXTRA_CA_CERTS=<path_to_mycert.pem>variable. For example, if you are using ZSH you add this in
- Re-start your Intellij and this should now work.