1

I am using Windows 7 64 bit, Spacemacs 0.200.9@25.1.1
I am running it behind a proxy and I want emacs know to find the proxy once it started so that it can download package for the first start of Spacemacs.

I found a partial answer:

(setq url-proxy-services
      '(("http"     . "http://proxy.example.com:8080")
        ("https"    . "http://proxy.example.com:8080")))

from here and here.

But I want to know how to make emacs configure the proxy setting every time when it start up automatically.

Thank you very much.

sflee
  • 1,659
  • 5
  • 32
  • 63

2 Answers2

1

In the past, I've explicitly set url-proxy-services. I recently started working behind a proxy again, and it seems like just setting the environment variables http_proxy, https_proxy, no_proxy, etc. is sufficient (as documented in url-proxy-services). I've tried this with msys2 in Windows and on Linux, but not with plain Windows Emacs (though I'd imagine it works there too). If it's not working, you can check that Emacs can see the env vars with e.g. (getenv "http_proxy") (should be non-nil).


I don't use Spacemacs, but I know there's a place to put code that will be executed before loading/installing packages. Also, this may be of interest.

jpkotta
  • 9,237
  • 3
  • 29
  • 34
  • Thank you, I have already set those parameters `http_proxy`, `https_proxy`, but it does not work. I will try to read the article you shared then. Thank you very much. – sflee Jun 10 '17 at 23:15
0

Please follow https://github.com/syl20bnr/spacemacs/issues/4807#issuecomment-328746396. That worked for me with Cygwin Emacs 26.1 and Spacemacs. The key is to clone Spacemacs twice, the 2nd time with a now existing customized .spacemacs file.

lgnom
  • 150
  • 1
  • 5