【错误记录】PyCharm 中从 GitHub 中 Clone 代码到本地报错 ( OpenSSL SSL_read: Connection was reset, errno 10054 )
文章目錄
- 一、報錯信息
- 二、解決方案
一、報錯信息
在 PyCharm 中從 GitHub 中 Clone 代碼到本地報錯 :
10:01:37.091: [C:\Users\octop\PycharmProjects] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false clone --progress --recurse-submodules https://github.com/han1202012/ELF_Parser.git -- ELF_Parser Cloning into 'ELF_Parser'... fatal: unable to access 'https://github.com/han1202012/ELF_Parser.git/': OpenSSL SSL_read: Connection was reset, errno 10054
二、解決方案
最簡單的方法 , 爬個梯子 , 就能解決上述問題 , GitHub 對國內支持很差 ;
如果沒有梯子 , 使用下面的方法解決 ;
如果想要裸連使用 GitHub , 參考 【錯誤記錄】GitHub 提交代碼失敗、獲取代碼失敗、連接超時、權限錯誤、ping 請求連接超時 ( 查找域名對應 IP | 設置 host 文件 ) 博客 ;
查找 github.global.ssl.fastly.net 和 github.com 域名對應的有效 IP 地址 , 配置到 C:\Windows\System32\drivers\etc\hosts 文件中 ;
一定要注意 , 下面的兩個 IP 地址在 2021 年 10 月 28 日 是有效的 , 不能保證一直有效 ; 如果無效 , 到 到 https://www.ip138.com/ 地址查詢 github.com , github.global.ssl.fastly.net 這兩個域名對應的 IP 地址是多少, 并且經過驗證后 , 再設置到 hosts 文件中 ;
配置對應域名的 IP 地址 : 在 C:\Windows\System32\drivers\etc\hosts 配置如下內容 ;
140.82.114.4 github.com 151.101.77.194 github.global.ssl.fastly.net配置完畢后的效果 :
設置了 hosts 文件 , GitHub 中的源代碼下載成功 ;
總結
以上是生活随笔為你收集整理的【错误记录】PyCharm 中从 GitHub 中 Clone 代码到本地报错 ( OpenSSL SSL_read: Connection was reset, errno 10054 )的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【错误记录】Python 安装依赖库报错
- 下一篇: 【Android 逆向】使用 Pytho