GitHub 棄用TLS 1.0、1.1導致SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

GitHub 棄用TLS 1.0、1.1導致SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

2018年02月28日 19:07:39 修電腦的裁縫醬 閱讀數:8767 標籤: gitgithubTLS 更多

個人分類: 版本控制

版權聲明:本文由 修電腦的裁縫醬 原創,博客鏈接爲 http://blog.csdn.net/huihut ,轉載請註明出處。 https://blog.csdn.net/huihut/article/details/79404421

報錯

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
  • 1
  • 2

原因

在 2018年2月22日19:00 UTC(太平洋標準時間上午11:00),GitHub 停止了對加密弱 TLS 1.0 和 1.1 協議的支持,並且僅支持與 TLS 1.2 協議的連接。

官方聲明:

Github . Weak cryptographic standards removal notice

因此,如果你的 git 連接方式仍然是 TLS 1.0 或 1.1,則會報錯。

解決

① 查看你的 TLS 版本

git config --global --list
  • 1

② 如果仍然是 TLS 1.0 或 1.1,則下載更新 Git 最新版:https://git-scm.com/

③ 安裝好最新版 Git 後,更新 TLS

git config --global --unset http.sslVersion
git config --global --add http.sslVersion tlsv1.2
  • 1
  • 2

④ 現在則可以使用 TLS 1.2 傳輸,並解決此問題

操作如下圖:

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章