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

[Help Wanted]: How to use self-signed certificates with GitHub Copilot #455

Open
2 tasks done
jerrylcliu opened this issue Mar 11, 2024 · 6 comments
Open
2 tasks done
Labels
beta Beta testing enhancement New feature or request pending release Finished, but not yet released

Comments

@jerrylcliu
Copy link

Before Reporting

  • I have checked FAQ, and there is no solution to my issue
  • I have searched the existing issues, and there is no existing issue for my issue

Describe your issue

Using copilot behind a Corporate network, will get this error: self signed certificate in certificate chain.
Behind a normal network, CopilotForXcode works well.
In VSCode, the extension "Mac CA VScode" can solve this;
How to solve this error in CopilotForXcode?

@jerrylcliu jerrylcliu added the help wanted Extra attention is needed label Mar 11, 2024
@intitni

This comment was marked as outdated.

@intitni
Copy link
Owner

intitni commented Mar 11, 2024

Nailed it!

  1. Go to ~/Library/Application Support/com.intii.CopilotForXcode/GitHub Copilot/executable/copilot/dist
  2. Rename agent.js to _agent.js.
  3. Download the following file, save it to the dist folder, and rename it to agent.js. The file is a javascript version of Mac CA VSCode.
  4. Restart the app to restart the language server.

agent.js.txt

I will try to include it in the app in the next release.

@intitni intitni added the enhancement New feature or request label Mar 11, 2024
@intitni intitni changed the title [Help Wanted]: How to solve "self signed certificate in certificate chain" [Help Wanted]: How to user self-signed certificates in with GitHub Copilot Mar 11, 2024
@intitni intitni changed the title [Help Wanted]: How to user self-signed certificates in with GitHub Copilot [Help Wanted]: How to use self-signed certificates in with GitHub Copilot Mar 11, 2024
@intitni intitni changed the title [Help Wanted]: How to use self-signed certificates in with GitHub Copilot [Help Wanted]: How to use self-signed certificates with GitHub Copilot Mar 11, 2024
@intitni intitni removed the help wanted Extra attention is needed label Mar 11, 2024
@jerrylcliu
Copy link
Author

Nailed it!

  1. Go to ~/Library/Application Support/com.intii.CopilotForXcode/GitHub Copilot/executable/copilot/dist
  2. Rename agent.js to _agent.js.
  3. Download the following file, save it to the dist folder, and rename it to agent.js. The file is a javascript version of Mac CA VSCode.
  4. Restart the app to restart the language server.

agent.js.txt

I will try to include it in the app in the next release.

Thanks for your reply. I try this, it does not work.
The error is still "self signed certificate in certificate chain".
Suggestion cannot show, it works well behind normal network

@intitni
Copy link
Owner

intitni commented Mar 12, 2024

It should work. Did you restart the service app? Where did you get the error message? I have never seen the message before.

Screenshot 2024-03-12 at 12 59 50 Screenshot 2024-03-12 at 12 55 38

@jerrylcliu
Copy link
Author

It should work. Did you restart the service app? Where did you get the error message? I have never seen the message before.

Screenshot 2024-03-12 at 12 59 50 Screenshot 2024-03-12 at 12 55 38

It has now taken effect. I had already restarted the app before my last reply, but it didn't work at that time. Just now, after restarting a few more times and opening Xcode, I found that it has indeed taken effect.
The error message is from console.app - CopilotForXcodeExtensionService, now it doesn't show😂

@intitni
Copy link
Owner

intitni commented May 22, 2024

Released in 0.33.1 beta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta Beta testing enhancement New feature or request pending release Finished, but not yet released
Projects
None yet
Development

No branches or pull requests

2 participants