Vscode: Save Proxy Credentials

Created on 15 Aug 2017  路  40Comments  路  Source: microsoft/vscode

  • VSCode Version: 1.15
  • OS Version: MacOS Sierra 10.12.6

It would be nice if Code could save my proxy credentials for a certain proxy address. It is a bit intrusive having to enter my credentials every time I hop onto my corporate proxy.

feature-request on-testplan proxy

Most helpful comment

Is there anything new about this topic? I love vscode, but this popup hurts every morning :(

All 40 comments

How about this issue? I was tired of proxy authentication popup after every restart. Perhaps there is a solution?

I concur with the previous comments, it's quite bothersome to reenter the credentials everytime I'm launching my IDE.

Is there anything new about this topic? I love vscode, but this popup hurts every morning :(

Same here! I would love not having to do a manual login every time vscode starts up.

Same for me, please add save crendials ! I've found there are other issues, like #44041

Same Problem here. This is sooo annoying. Please Please fix it

+1

same problem for me !

Same for me. I hope this problem will be solved as soon as possible.

Any updates on this?

It's shocking to see, this issue was opened nearly one and half an year ago, and still no fix, while vs code is launching new and complicated feature every month.
Its really annoying to put the credential several times, every day and sometimes extensions (like wakatime) doesn't work properly for this.

Just started using VSCode at work and it's really annoying having to type creds in each time. Even a "save credentials" tickbox would reduce some of the annoyance.

This is the largest UX pain point for me in a nearly perfect and constantly improving tool.

This is very annoying.

Additional info:
In my case the window shows up twice. Any idea why this happens?
I am pretty sure that I enter the credentials correctly both times.

@FerhatAkgun this is because of the extensions.

Nearly 2 years ago for a (simple?) useful feature. dying

Hi,
i got the same problem. I disabled all extensions: same problem.
In my case, it was due to the fact that we face 2 proxy settings: 1st is user specific, the other one is workspace specific. And i haven't fill the second one.
In my case, this solved the problem when i filled up both proxy settings with the user/password syntax: http://user:password@proxy:proxy_port

image
image

I tried that but the proxy box is still popping up

+1

I do not need this change any more because I've changed my employer and they use a transparent proxy ... lol

I have been following this ticket for a year now...

Same issue for me, the pop-up appers twice (once for the Extensions I guess).

Windows 10, 64-bit
VS Code 1.33.1 (user setup)

I tried lots of things in the GUI settings and settings.json for User Settings and Workspace Settings, also both as mentioned in https://github.com/microsoft/vscode/issues/32566#issuecomment-480692463

    "http.proxy": "http://user:password@proxy-ip:port" (with password, without, username only, ...)
    "http.proxyStrictSSL": false or true
    "http.proxySupport": "on (override, off, ...)

The environment variables are set (lowercase) and work fine for other programs

https_proxy=http://user:password@proxy-ip:port
http_proxy=http://user:password@proxy-ip:port
  • What is the expected behaviour? Is VS Code always supposed to ask for the password even if it is stored in the URL in the settings or the environment variables?
  • Could there be a "store password" in this pop-up which puts it to the settings.json if authentication works?

I have a different issue that my popup never show up even I'm behind a proxy which need authentication. This makes my VSCode not connected to network and I don't know how to fix this :/

I have this issue too. It's really annoying to type in my proxy credentials every time I open VSCode.

I am living the pain also.....starting to think about switching back to Atom.

I found this issue https://github.com/Microsoft/vscode/issues/38888

They mention that supplying the proxy parameters on the command line works, even if setting it in VS Code doesn't. And this works for me. Still not beautiful, as the password is clear text, but for the other options (environment variables, settings.json) this would also be the case.

So I added this to my desktop shortcut and the two popups are gone:

"C:\Path\To\Code.exe" --proxy-server=http://user:[email protected]:8080

Specifying --proxy-server= makes the pop up disappear, but the IDE cannot actually connect to the Internet. Trying to check for updates for the IDE or the extensions fails either with time out, or with net::ERR_NO_SUPPORTED_PROXIES.

Yes, that's correct. Argh, it can't be that difficult.

Is there a way to see which proxy settings are being used when VSC is connecting somewhere? I checked the developer tools but they only state the errors.

OK, I found a workaround. So, headless Chrome has the same exact problem if you are trying to do automated testing with something like Selenium and this wiki page for Docker Selenium hinted at using a local proxy without authentication that would proxy requests to your proxy with authentication.

Anyway, after some searching I finally figured out a way to create that local proxy. Here is a Gist with the instructions. If you follow the steps you should be able to run any program that supports a proxy without having to provide credentials to it, even if your corporate proxy requires authentication.

Actually, you could probably easily make a VSCode plugin that implements that workaround without having to modify VSCode core.

@zicklag, I tried your Gist and it works like charm! Thanks!

I tried the Gist (on Windows 10, starting manually "node index.js") and unfortunately does not work for me => still getting the annoying VSCode Proxy dialog.

@amir-alic Did you set your proxy settings in VSCode to http://localhost:3128. That will make VSCode use the local proxy that you started when you ran node index.js, which won't ask for authentication.

You can enter the settings in VSCode, or if you have problems with other software you can also set the user environment variables http_proxy and https_proxy both to http://localhost:3128 or https://localhost:3128 which VSCode will find and use.

I just found a much easier "proxy proxy" to use instead of the NodeJS one from my Gist above. You can use glider. Just run it like this:

glider -listen http://localhost:3128 -forward http://user:[email protected]:1234

That is way nicer than using Node and writing a script and it also fixes a problem with my previous suggestion that I noticed recently: the NodeJS proxy will listen on all IP addresses which means that anybody on your local network that knows the port you are hosting the server on will be able to connect to your computer on that port to make proxied requests with your credentials. Probably not good.

Glider also doesn't require installing NodeJS or using npm to install dependencies. It is just a single downloadable binary.

And here is a bash startup script that you could use to start it in the background:

#!/usr/bin/env bash
node /path/to/webproxy/index.js &
disown $(jobs -p)

Actually, you could probably easily make a VSCode plugin that implements that workaround without having to modify VSCode core.

Brother, write this extension yourself.
I think you can handle it.

If we cannot save proxy credential, could we have a better UI for the proxy dialog?
A better UI likes something has unify/sync theme/style with the rest UI.
If we have this, the pain of typing credential every morning will much reduce.

With https://github.com/microsoft/vscode/issues/106489 landing in October there is a new setting "window.enableExperimentalProxyLoginDialog": true to enable a new login experience that will show a dialog in the active window:

image

This experience allows to remember the credentials and thus not ask again.

I would appreciate if people could try this from our insider build today and give some feedback how it goes. We would like to make this experience the new default beginning with our release end of the year if it works fine.

You can give our preview releases a try from: https://code.visualstudio.com/insiders/

Note: to clarify, the credentials will be persisted in the OS specific credentials store (keychain on macOS, Windows Credential Manager on Windows and gnome keyring on Linux). In case the credentials are wrong or outdated, you will still get the login dialog showing up again allowing you to change the credentials.

Just tested it and it works as advertised!

Thank you for putting effort into this. As an issue with 51 :+1: and tons of other users who probably never bothered to jump on GitHub and search for an issue, I think this will really help our a bunch of people!

Closing, as this shipped and is being tested during the week via https://github.com/microsoft/vscode/issues/109377. Will address issues as we see them.

Just as a feedback, I just testes the released version and everything seems to be working pretty fine. Thanks to everyone involved in this!

Was this page helpful?
0 / 5 - 0 ratings