On Emacs 26.3, Ubuntu 20.04, when I run

emacs -Q

followed by


I get

Contacting host: elpa.gnu.org:443

So the package refresh just hangs. I tried to switch from https to http, but no luck.

  • FWIW there was a bug about this (closed as unfixed). I still have the issue (Emacs hangs, not only stuck at "Contacting host: ...") with GNU Emacs 26.1
    – Httqm
    Nov 4, 2020 at 11:13

2 Answers 2



 '(gnutls-algorithm-priority "normal:-vers-tls1.3"))

Found by @sds (https://emacs.stackexchange.com/a/56067/21569) and the emacs-devel mailing list (Cf. https://emacs.stackexchange.com/a/56067/795 ).

Supposedly the underlying issue was fixed in emacs 26.3, but I still see it in emacs 27.1[^1].

[^1]: exact versions

( cat /etc/fedora-release ; uname -a ; rpm -q emacs) | sed -e "s/$(hostname)/XXX/"
Fedora release 33 (Thirty Three)
Linux XXX 5.10.12-200.fc33.x86_64 #1 SMP Mon Feb 1 02:40:52 UTC 2021 x86_64 
x86_64 x86_64 GNU/Linux

Having a similar issue with the MELPA stable repository (GNU Emacs 26.1 on Debian 10.6), I've been able to workaround this with :

(setq package-check-signature nil)
(require 'package)
(setq package-archives '(
    ("melpa-stable" . "http://www.mirrorservice.org/sites/stable.melpa.org/packages/")

with some limitations / remarks :

  • I suggest you to look into fixing HTTPS. It will affect far more than just fetching packages. The package signature part isn't required if you only use MELPA.
    – wasamasa
    Nov 5, 2020 at 7:34

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.