cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure the proxy or certificate for STM32CubeIDE for Visual Studio Code

Nawres GHARBI
ST Employee

If your connection is protected by your company's network security protocols, you likely need to configure a proxy or a certificate to be able to access servers and download packages. 

This is how you succeed in having full server access with our STM32CubeIDE for Visual Studio Code extension to:

  • Install STMicroelectronics extensions from the VS Code Marketplace 
  • Install STM32Cube bundles from the bundle registry 
  • Install STM32 packs from the pack registry  

1. Certificate configuration

  1. The manual configuration (Windows) 
    • Ensure that you have this configuration in your settings:
      • System certificate V2 unchecked
      • System certificate checked
        NawresGHARBI_6-1760085148209.png 
    • Get your certificate from your company IT or company portal.
    • Place it under "c:\certificate" for example.
    • Add the Windows Environment variable NODE_EXTRA_CA_CERTS with the path to this certificate file. 
    • Restart Visual Studio Code. 
    • In the command palette, launch "STM32Cube: check proxy settings" command to ensure that you have access.
  2. Assuming your corporate self-signed certification is trusted by your operating system (Windows).
    You can now configure Visual Studio Code to use the operating system certification. Launch Visual Studio Code, go to File → Preferences → Settings → Search for "certificates" and check the box for Http → "Experimental: System Certificates V2."
    IT Controls whether experimental loading of CA certificates from the OS should be enabled

NawresGHARBI_4-1760085148208.png

3. Import the certificate to your operating system (Windows.) Make sure that the certificates are imported into your OS and trusted in the system category. Then, go into Visual Studio Code settings → Application, Proxy, and uncheck the "System certificates" option. Restart Visual Studio Code and recheck it. Restart Visual Studio Code once again, and it should work.  

NawresGHARBI_5-1760085148208.png

4.Linux certificate configuration

  • dd the following line to ~/.profile: export NODE_EXTRA_CA_CERTS=[PATH_TO_CA_BUNDLE] 
  • Logout and login to the Ubuntu session 
  • Restart VS Code and verify with the command "STM32Cube: check proxy settings"

      5. MacOS certificate configuration

  • Create a file ~/Library/LaunchAgents/setenv.NODE_EXTRA_CA_CERTS.plist with this content: 

<?xml version="1.0" encoding="UTF-8"?> 

 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 

 <plist version="1.0"> 

 <dict> 

     <key>Label</key> 

     <string>setenv.NODE_EXTRA_CA_CERTS</string> 

     <key>ProgramArguments</key> 

     <array> 

         <string>launchctl</string> 

         <string>setenv</string> 

         <string>NODE_EXTRA_CA_CERTS</string> 

         <string>[PATH_TO_CA_BUNDLE]</string> 

     </array> 

     <key>RunAtLoad</key> 

     <true/> 

 </dict> 

 </plist> 

  • Restart or execute the load command in Terminal.app: launchctl load ~/Library/LaunchAgents/setenv.NODE_EXTRA_CA_CERTS.plist 
  • Restart Visual Studio Code and test with the command "STM32Cube: check proxy settings"

2. Proxy configuration

  •  Open the VS Code settings and type proxy in the search bar. 

 

NawresGHARBI_2-1760085148206.png

 

  • Put your proxy in this format "http://Proxy-address:port" (Visual Studio Code prompts you to provide your login and password.) 
     
    NawresGHARBI_3-1760085148207.png

 

  • For security reasons, we do not use the "http://user:psw@Proxy-address:port" format for the proxy, but if you have to, special characters must be transformed to hex format. For example, a # is written as %25. 

3. Extension proxy configuration

Our extensions check the connection to the bundle registry at VS Code startup. 

In case of connection issues, a notification is displayed: 

NawresGHARBI_0-1760108070721.png

Choose to set your credentials with "Proxy Credentials…" option.  

  • Set the proxy username and press Enter: 

NawresGHARBI_1-1760108070722.png

  • Set the proxy password and press Enter: 

NawresGHARBI_2-1760108070723.png

  • Ensure that the connection succeeds: 

NawresGHARBI_3-1760108070723.png

  • Continue “STM32CubeIDE for VS Code” setup by installing the required bundles: 

NawresGHARBI_4-1760108070723.png

Note 1: Proxy credentials can be erased with this VS Code command.

Note 2: A connection check can be started at any time with this VS Code command.

NawresGHARBI_5-1760108070724.png

4. Troubleshooting SSL

In most corporate situations, setting a proxy URL and its credentials is not enough. The proxy uses a nonpublic CA certificate between your computer and it. 

This leads to a situation where tools cannot ensure that the https connection is valid, with these usual errors in VS Code: 

Marketplace: 

NawresGHARBI_6-1760108204282.png

“STM32Cube core” output channel: 

NawresGHARBI_7-1760108204283.png

 

NawresGHARBI_8-1760108204284.png

To fix it, you must ensure that: 

  1. The proxy CA certificates are configured into your system trust-store. This is usually provided by your local IT department.
  2. The NODE_EXTRA_CA_CERTS environment variable is defined system wide and points to the proxy CA certificates bundle file (request your local IT to share this file with you.) 
Version history
Last update:
‎2025-10-31 6:44 AM
Updated by: