It works fine from here using Emacs 26.2. If it doesn't work correctly, maybe it gives more details, check the buffer *Messages*. And you can also set the variable url-debug to t to enable logging.
– xuchunyangAug 16 '19 at 13:30
1
If you are using emacs 26 you can try setting gnutls-debug-level to 1,2, or higher. See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34341#13 and http://emacs.1067599.n8.nabble.com/bug-32658-26-1-Cannot-connect-to-TLS-websites-tp464581p484081.html
– TobiasAug 16 '19 at 16:10
Perhaps you have an issue similar to mine relating to an outdated version of openSSL: https://emacs.stackexchange.com/questions/51285/url-retrieve-synchronously-how-to-retrieve-github-gist-list One of the core maintainers (npostavs made a few comments that may be helpful underneath the question and/or answer). I'm sure npostavs is right, but I just wanted to get it working with little fuss ... and I already had a newer version of openSSL on the computer (but not in the $PATH) and I just needed to adjust a couple of settings.
– lawlistAug 17 '19 at 07:44
In addition to the suggestions above by Tobias and xuchunyang, you can cause Emacs to generate useful debugging messages by typing: M-x toggle-debug-on-error. If the issue is an outdated version of openSSL as described in the link to the thread in my previous comment hereinabove, then toggling general Emacs debugging should produce the same error report described in the question of said thread.
– lawlistAug 17 '19 at 19:27
@lawlist i turned toggle-debug-on-error on, and the error is "connection broken by remote peer".
– FunkyBabyAug 19 '19 at 06:04
*Messages*. And you can also set the variableurl-debugtotto enable logging. – xuchunyang Aug 16 '19 at 13:30gnutls-debug-levelto 1,2, or higher. See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34341#13 and http://emacs.1067599.n8.nabble.com/bug-32658-26-1-Cannot-connect-to-TLS-websites-tp464581p484081.html – Tobias Aug 16 '19 at 16:10M-x toggle-debug-on-error. If the issue is an outdated version of openSSL as described in the link to the thread in my previous comment hereinabove, then toggling general Emacs debugging should produce the same error report described in the question of said thread. – lawlist Aug 17 '19 at 19:27gnutls-log-level. – Adam Spiers Jul 09 '23 at 23:35