When running package-list-packages
I get the following errors:
Failed to download `gnu' archive.
gnutls.c: [0] (Emacs) fatal error: The TLS connection was non-properly terminated.
I am running Emacs 24.4 on Windows. Until this week package downloads were happening normally.
I've tried this guide on setting up Emacs-GnuTLS-Windows. I tried running this code from the See if it works section:
(condition-case e
(delete-process
(gnutls-negotiate
:process (open-network-stream "test" nil "www.google.com" 443)
:hostname "www.google.com"
:verify-error t))
(error e))
I do get nil
inserted into the buffer, with no validation error, which according to the article is a sign of success. However, if I set (setq gnutls-log-level 2)
and run the code again, I get the following output.
gnutls.c: [1] (Emacs) allocating credentials
gnutls.c: [2] (Emacs) allocating x509 credentials
gnutls.c: [2] (Emacs) using default verification flags
gnutls.c: [1] (Emacs) setting the trustfile: c:/gnutls/cacert.pem
gnutls.c: [1] (Emacs) gnutls callbacks
gnutls.c: [1] (Emacs) gnutls_init
gnutls.c: [1] (Emacs) got non-default priority string: NORMAL
gnutls.c: [1] (Emacs) setting the priority string
gnutls.c: [audit] Note that the security level of the Diffie-Hellman key exchange has been lowered to 256 bits and this may allow decryption of the session data
gnutls.c: [1] (Emacs) non-fatal error: Resource temporarily unavailable, try again. [1428 times]
gnutls.c: [2] (Emacs) Deallocating x509 credentials
So that seems a bit odd. According to this mailing list, the error isn't usually harmful. Nevertheless, I still cannot download gnu
.
How can I restore normal package fetching?
June update
Although there are some suggestions on GitHub that the error message is spurious, gnu
still fails to fetch. I confirmed this by checking local package versions with recently updates to the online repository.
24.5 update
I can no longer reproduce the issue after upgrading to Emacs 24.5.