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

Save Proxy Credentials #32566

Closed
akcorp2003 opened this issue Aug 15, 2017 · 40 comments
Closed

Save Proxy Credentials #32566

akcorp2003 opened this issue Aug 15, 2017 · 40 comments
Assignees
Labels
feature-request Request for new features or functionality on-testplan proxy Issues regarding network proxies
Milestone

Comments

@akcorp2003
Copy link

  • 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.

@joaomoreno joaomoreno added this to the Backlog milestone Aug 17, 2017
@joaomoreno joaomoreno added feature-request Request for new features or functionality proxy Issues regarding network proxies and removed new release labels Aug 17, 2017
@joaomoreno joaomoreno removed their assignment Aug 17, 2017
@naprelsky
Copy link

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

@benjaminfontaine
Copy link

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

@ghost
Copy link

ghost commented Feb 13, 2018

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

@vrbsky
Copy link

vrbsky commented Feb 16, 2018

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

@albertotn
Copy link

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

@DiabolusExMachina
Copy link

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

@ghost
Copy link

ghost commented Dec 7, 2018

+1

@mayes21
Copy link

mayes21 commented Dec 20, 2018

same problem for me !

@rossan518
Copy link

rossan518 commented Jan 12, 2019

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

@ruchernchong
Copy link

Any updates on this?

@Koushikphy
Copy link

Koushikphy commented Mar 6, 2019

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.

@miicah
Copy link

miicah commented Mar 6, 2019

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.

@zicklag
Copy link

zicklag commented Mar 11, 2019

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

@FerhatAkgun
Copy link

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.

@Koushikphy
Copy link

@FerhatAkgun this is because of the extensions.

@willemavjc
Copy link

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

@cytar
Copy link

cytar commented Apr 8, 2019

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

@Koushikphy
Copy link

I tried that but the proxy box is still popping up

@Benj1907
Copy link

+1

@Shinigami92
Copy link

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...

@solarjoe
Copy link

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 #32566 (comment)

    "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?

@howar31
Copy link

howar31 commented Jun 26, 2019

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 :/

@tady159
Copy link

tady159 commented Jul 18, 2019

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

@tixuoty
Copy link

tixuoty commented Sep 10, 2019

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

@solarjoe
Copy link

I found this issue #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:password@123.123.123.123:8080

@koutheir
Copy link

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.

@solarjoe
Copy link

solarjoe commented Sep 11, 2019

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.

@zicklag
Copy link

zicklag commented Sep 12, 2019

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.

@zicklag
Copy link

zicklag commented Sep 12, 2019

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

@solarjoe
Copy link

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

@amir-alic
Copy link

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.

@zicklag
Copy link

zicklag commented Sep 19, 2019

@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.

@solarjoe
Copy link

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.

@zicklag
Copy link

zicklag commented Oct 2, 2019

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:pass@123.456.789.1: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)

@joaomoreno joaomoreno self-assigned this Oct 28, 2019
@rakhmaevao
Copy link

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.

@quyleanh
Copy link

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.

@bpasero
Copy link
Member

bpasero commented Oct 27, 2020

With #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.

@zicklag
Copy link

zicklag commented Oct 27, 2020

Just tested it and it works as advertised!

Thank you for putting effort into this. As an issue with 51 👍 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!

@bpasero
Copy link
Member

bpasero commented Oct 27, 2020

Closing, as this shipped and is being tested during the week via #109377. Will address issues as we see them.

@bpasero bpasero closed this as completed Oct 27, 2020
@guilhermetod
Copy link

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

@github-actions github-actions bot locked and limited conversation to collaborators Dec 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality on-testplan proxy Issues regarding network proxies
Projects
None yet
Development

No branches or pull requests