Visual Studio Code terminal cannot use proxy

Viewed 2244

I tried to do a maven clean for a project in Visual Studio Code but I got an exception of java.net.UnknownHostException: repo.maven.apache.org. I suspect this is caused by proxy as the development environment here requires a proxy for Internet access, and we use .pac file in IE proxy setting.

In File -> Preferences -> Settings -> User -> Application -> Proxy, I setup the proxy address as http://username:password@my.proxy.address:8080. In settings.json, I put as followings:

{
    "http.proxy": "http://username:password@my.proxy.address:8080",
    "https.proxy": "http://username:password@my.proxy.address:8080",
    "http.proxyStrictSSL": false
}

Now I am able to search for extensions, but terminal is not working. How can I solve it?

1 Answers

If you want to use the proxy in the terminal (f.e. vsc) you have to update the system variables:

http_proxy http://username:password@my.proxy.address:8080
https_proxy http://username:password@my.proxy.address:8080
Related