Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

My Internet access is delivered through an authenticated proxy. This is setup correctly in the "Internet Options" control panel applet and all browsing/GUI apps work fine.

For cmd, proxy settings are typically set by exporting http_proxy. The applications I'm trying to use are git and Putty's pscp.exe. I've tried the following syntax to no avail:

 set http_proxy=http://username:password@proxyserver.com:port/

I've also experimented with Netsh.exe and ProxyCfg.exe with no luck.

How does one configure an authenticated proxy in the Windows command prompt?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

It completely depends on the program you are trying to use - in this case, pscp. (cmd itself does not have any proxy settings - it doesn't make any connections, only executes commands.)

pscp is part of PuTTY, so it uses the same settings, which you can configure in PuTTY's GUI:

  • Start PuTTY.
  • In the configuration window, click ConnectionProxy, pick HTTP, configure the rest.
  • Go back to Session, select Default Settings, and click Save.
  • pscp should now use the proxy.

I don't know what protocol are you trying to use with Git -- if it's SSH, using user@host:path or ssh://, then it depends on the value of %GIT_SSH%. If it is set to plink, the above procedure applies.

For http://, Git should honor %http_proxy%. For git://, you'll likely have to play with %GIT_PROXY_COMMAND%.

share|improve this answer
    
Perfect! Configuring the default proxy settings in putty and setting %GIT_SSH% to plink solved it. Thanks. –  tlvince Dec 28 '10 at 12:00
    
Is there a windows-native way to do this in the CMD ? –  jave.web Nov 18 at 12:20

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.