-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Which directory should I put the crt/pem certificate in? #3641
Comments
@AfterStories are you trying to just configure the If it's the first option, it shouldn't matter where you set the |
hi, @Patrick-Erichsen, I hope to achieve a goal. After installing the plugin, the model loaded is my own model configuration. Assuming the name is ABC, it will call my own API.
So I modified this file, so I think yes, I modified the source code. change to
But I don't know the logic of the process of packaging into an installation package. Can you please guide me? I want to include my crt/pem files in the final packaged installation package I noticed that after installing the plugin using the installation package, the plugin configuration directory will be generated in the C:\Users\account_name.continue directory, which contains config.json. Can you tell me where the logic code for generating this directory in the user's computer directory is? Maybe I can try to write a similar logic in it, put the certificate file in this directory, and let the config.json here read the crt/pem certificate file in the same directory. And,the packaging command is |
Ok guys, I think I found a config item that can turn off SSL verification, but this configuration is not mentioned in the continue docs
After debugging, I found that the "node-fetch" library is actually used when continuing to call the API request in the packages\fetch\src\fetch.ts when your add requestOptions in config.json |
Did you come across this section of the docs by any chance? If not I'm curious where you were looking, maybe there's a better place we can call this out. |
Ohh, sorry, I really didn't read this part, because before encountering specific problems, I usually don't pay special attention to these detailed configurations. I found the use of verifySsl by debug the source code. I think maybe writing this config item in this document may also help people who encounter the same problem, https://docs.continue.dev/troubleshooting#configure-certificates |
After testing, I found that in IntelliJ, you only need to configure "verifySsl": false to turn off verification. This is a configuration item provided by the "node-fetch" library. However, if you call the API in vscode, you still need to configure the certificate crt/pem files to succeed. It seems that calling the API request in vscode does not use node-fetch? For me, I don't need to care about vscode for the time being. I decided not to close this issue for the time being. If anyone has a way to turn off ssl verification in vscode, please feel free to leave a message. |
Before submitting your bug report
Relevant environment info
Description
My API uses custom certificates. According to the following document, I need to configure a pem certificate, and after the configuration,now it is successful to use the API
https://docs.continue.dev/troubleshooting#configure-certificates
My question:
I edit the core\config\default.ts file. I hope that after my users install the plugin, the default model displayed is my "ABC" model, and it can be used directly,No need to manually add models, So I changed the default config to ABC model, hoping that the generated config.json file would contain the default config like this:
However, when I package the project into an installation package for others users to install and use, I think I need the installation package zip file to also contain these special certificate files so that users can call my API.
So where should I put these certificate files so that the packaged installation package contains these certificate files? And the config.json of continue after installation should be able to read these certificate files correctly. You can see that my current certificate address is written as an absolute path, I think it should be configured as a relative path
By the way, I think you need to supplement the documentation. After my test, it is OK to use crt file directly. The troubleshooting document example uses pem file. In addition, it is not possible to use crt certificate at server domain level directly. You need to configure multiple levels of complete certificates in array. Although you suggested that you can use array, I didn’t know which certificates I needed to configure in the array at first. After asking GPT, learning and testing, I found that I can use the "connection is secure" menu in the browser address bar to export the server certificate, and see in the details tab that usually the server certificate has three levels, from root level, to middle level, and specific server domain level. The three levels of certificates are exported as crt files and configured in the array, and finally I can call my API. I think this is a special knowledge in the network.
To reproduce
No response
Log output
No response
The text was updated successfully, but these errors were encountered: