Make TLS error hack to work offline
This commit is contained in:
parent
25f639e403
commit
1541f7f515
|
@ -17,9 +17,20 @@
|
||||||
(version< emacs-version "26.3"))
|
(version< emacs-version "26.3"))
|
||||||
;; Hack to prevent TLS error with Emacs 26.1 and 26.2 and gnutls 3.6.4 and above
|
;; Hack to prevent TLS error with Emacs 26.1 and 26.2 and gnutls 3.6.4 and above
|
||||||
;; see https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34341
|
;; see https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34341
|
||||||
(with-current-buffer (url-retrieve-synchronously "https://api.github.com/users/syl20bnr/repos")
|
(ignore-errors
|
||||||
(when (string-empty-p (buffer-string))
|
(with-current-buffer (url-retrieve-synchronously "https://api.github.com/users/syl20bnr/repos")
|
||||||
(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3"))))
|
(when (string-empty-p (buffer-string))
|
||||||
|
(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")))))
|
||||||
|
|
||||||
|
;; (condition-case err
|
||||||
|
;; (url-retrieve-synchronously apath)
|
||||||
|
;; ('error
|
||||||
|
;; (display-warning
|
||||||
|
;; 'spacemacs
|
||||||
|
;; (format
|
||||||
|
;; "\nError while contacting %s repository!"
|
||||||
|
;; aname) :warning)
|
||||||
|
;; 'error))
|
||||||
|
|
||||||
(when (version< emacs-version "26")
|
(when (version< emacs-version "26")
|
||||||
;; backport fix for macOS battery status
|
;; backport fix for macOS battery status
|
||||||
|
|
Loading…
Reference in New Issue