On Emacs 26.3, Ubuntu 20.04, when I run
emacs -Q
followed by
(package-refresh-contents)
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.
On Emacs 26.3, Ubuntu 20.04, when I run
emacs -Q
followed by
(package-refresh-contents)
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.
Try:
(custom-set-variables
'(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
emacs-27.1-2.fc33.x86_64
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 :
(package-initialize)
(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 :