GitHub 棄用TLS 1.0、1.1導致SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
阿新 • • 發佈:2019-02-14
報錯
git push 到 Github 的時候出現異常:
fatal: unable to access 'https://github.com/huihut/interview.git/': error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
Pushing to https://github.com/huihut/interview.git
原因
在 2018年2月22日19:00 UTC(太平洋標準時間上午11:00),GitHub 停止了對加密弱 TLS 1.0 和 1.1 協議的支援,並且僅支援與 TLS 1.2 協議的連線。
官方宣告:
因此,如果你的 git 連線方式仍然是 TLS 1.0 或 1.1,則會報錯。
解決
① 檢視你的 TLS 版本
git config --global --list
③ 安裝好最新版 Git 後,更新 TLS
git config --global --unset http.sslVersion
git config --global --add http.sslVersion tlsv1.2
④ 現在則可以使用 TLS 1.2 傳輸,並解決了此問題
操作如下圖: