Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am accessing web (port 80) using a proxy server which requires authentication. For web browser, it pops a window where I can enter my username and password but when I am using command-line (cmd) and try to run a program which uses web, no authentication window is poped and it says that authentication fails. I have entered proxy address in IE which the whole system uses but how can I find some alternative to authentication window for command-line?

share|improve this question
2  
What program are you using? Some tools like wget/curl will allow you to pass the proxy auth credentials. – Zoredache Jun 27 '10 at 1:34

The command line is not the one in charge of HTTP authentication - it is the program you run from the command line. There is no setting that would work for all command line run programs.

share|improve this answer
    
@shweelz Answer seems to indicate otherwise – DarcyThomas May 22 at 5:23
    
@DarcyThomas - That would only work for applications using the WinHTTP API – Ofir May 23 at 10:34

This is kind of an old question, but I came across it and saw it didn't have an accepted answer, so I'll give some feedback in case anyone else stumbles across this question.

I had to authenticate myself with a corporate proxy using the command line so I could install some Rubygems. I used

set http_proxy=http://username:password@www-domain.com:80

I'm not sure why the proxy server didn't recognize me even though I was logged into my corporate account, but I needed to re-authenticate myself, and that worked for me. After using that command, I could download the Rubygems. It does require you to type your password in plaintext, and that will appear in plaintext to anyone doing a packet capture during your session. Maybe someone can suggest a way to feed in credentials securely?

share|improve this answer
    
Was this on windows or linux? – DarcyThomas May 19 at 23:23
    
That one is Windows. Linux / Mac should look something like this: export HTTP_PROXY=username:password@proxy.com:80 (or replace 80 with whichever port your proxy uses) – Shwheelz May 20 at 19:45
    
I assume that would only last until the end of the session & presumably if it set that in the global envrioment variables it would work for all sessions (yes that would mean storing my password in plain text == bad) Do you know if it would also apply to desktop apps as well? (Will test for my self on monday) – DarcyThomas May 22 at 6:37
    
That would only work for applications using the WinHTTP API – Ofir May 23 at 10:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.