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)
  • MELPA is on melpa.org now. – lunaryorn Nov 23 '15 at 23:03
  • I used melpa.org/packages But I still get the same error. – Chetan Yewale Nov 24 '15 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? – lunaryorn Nov 24 '15 at 14:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.