As of 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 2023-01-25
.
Fix
- Export the self-signed certificate in your respective OS. For example, in macOS, it would be present in
Keychain Access
->Certificate
which you can right-click and export. - Convert the certificate to
.pem
format. For example, if the certificate is in.cer
format then you run this :openssl x509 -inform der -in <exported_cert>.cer -out mycert.pem
- Export
NODE_EXTRA_CA_CERTS=<path_to_mycert.pem>
variable. For example, if you are using ZSH you add this in~/.zshrc
export NODE_EXTRA_CA_CERTS="<path_to_mycert.pem>"
- Re-start your Intellij and this should now work.