9

This is with the latest Emacs Version 27.2 (9.0) for Mac OS X:

error in process sentinel: Error retrieving: https://elpa.gnu.org/packages/archive-contents (error connection-failed "connect" :host "elpa.gnu.org" :service 443) [2 times]

I can access that address in a web browser fine.

My .emacs file contains a basic package configuration:

(require 'package)

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

(package-initialize)

I see others have this issue, but it's a very different issue, the answers suggest this was fixed in Emacs 27+, which I'm already using.

Error retrieving: https://elpa.gnu.org/packages/archive-contents (error http 400)

4
  • It may be a temporary network glitch. What happens if you wait a few minutes and try again?
    – NickD
    Commented Aug 27, 2021 at 17:54
  • I deleted ~/.emacs.d, did a full reinstall of the latest Emacs for Mac OS X, waited several hours, and I consistently get the exact same error. I can also reliably load that web address in a web browser. I have a very good Internet connection.
    – clay
    Commented Aug 27, 2021 at 19:44
  • 2
    @clay I have the same problem; it's not just you.
    – Simon K
    Commented Sep 10, 2021 at 18:37
  • 1
    Further to my previous comment, I've downgraded from Emacs 27.2.2 to 27.1.1 and things are now working fine.
    – Simon K
    Commented Sep 10, 2021 at 19:27

1 Answer 1

8

For me, a fix is:

(when (equal emacs-version "27.2")
  (setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3"))

I found this at Error retrieving: https://elpa.gnu.org/packages/archive-contents (error http 400)

EDIT:

The problem is only on some platforms, so I've changed that to:

(when (and (equal emacs-version "27.2")
           (eql system-type 'darwin))
  (setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3"))

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.