I am using Emacs on a Win7 machine. I have added the Melpa repo. in init.el. When I do M-x list-packages, I do get a buffer listing the packages from Melpa.

But, when i try to download them, I get an error:

open-network-stream: make client process failed: connection timed out, :name, melpa.milkbox.net, :buffer, #<killed buffer>, :host, melpa.milkbox.net, :service, 80, :nowait, nil...

Please note that I am using Emacs behind a corporate proxy. Emacs is able to download the list of packages but not able to install any.

Please find below snippet from my init.el:

(require 'package)
(add-to-list 'package-archives
         '("melpa" . "http://melpa.milkbox.net/packages/"))
(add-to-list 'package-archives
         '("org" . "http://orgmode.org/elpa/") t)
(add-to-list 'package-archives
     '("gnu" . "https://elpa.gnu.org/packages/"))


;; line numbers in emacs everywhere
(global-linum-mode t)

(set-face-attribute 'default nil :font "Consolas-12")

;; set proxy
(defun proxy-activate ()

 (let ((proxy "unrealproxy:8080") (credentials      "unrealusername:unrealpwd"))
 (setq url-proxy-services
  `(("no_proxy" . "^\\(localhost\\|10.*\\)")
   ("http" . ,proxy)
   ("https" . ,proxy)))

 (setq url-http-proxy-basic-auth-storage
  (list (list proxy
            (cons "Input your LDAP UID !"
                  (base64-encode-string credentials)))))))

 (provide 'proxy-activate)
  • 2
    MELPA is on melpa.org now.
    – user227
    Nov 23, 2015 at 23:03
  • I used melpa.org/packages But I still get the same error. Nov 24, 2015 at 12:31
  • Can you add the result of M-: (switch-to-buffer (url-retrieve-synchronously "http://melpa.org")) after M-x toggle-debug-on-error to your question?
    – user227
    Nov 24, 2015 at 14:51

2 Answers 2


MELPA moved to melpa.org, so use this in your .emacs:

(add-to-list 'package-archives
         '("melpa" . "https://melpa.org/packages/") t)

I know this is really old, but in case this helps someone else, as of November 2020, Melba is now located at http://melpa.milkbox.net/packages:

(add-to-list 'package-archives
         '("melpa" . "http://melpa.milkbox.net/packages/"))

Reference: https://melpa.org/#/getting-started

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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