最近在使用git时又报出来了这样一个错误“OpenSSL SSL_read: Connection was reset, errno 10054”,意思是OpenSSL SSL_read:连接已重置,错误号 10054 ,于是我就上网搜索了有关解决办法,下面的方法是我使用过真是不错的,我将分享给大家,希望能够帮助你们。
1 2 3 4 5 6 7 8 9 10
| fatal: unable to access 'https://github.com/Whisper609/Whisper609.github.io.git/': OpenSSL SSL_read: Connection was reset, errno 10054 FATAL { err: Error: Spawn failed at ChildProcess.<anonymous> (E:\Whiper609blog\Whisper609\node_modules\hexo-util\lib\spawn.js:51:21) at ChildProcess.emit (events.js:400:28) at ChildProcess.cp.emit (E:\Whiper609blog\Whisper609\node_modules\cross-spawn\lib\enoent.js:34:29) at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12) { code: 128 } } Something's wrong. Maybe you can find the solution here: %s https://hexo.io/docs/troubleshooting.html
|
首先出现这个的原因是网络不稳定而导致的连接超时问题。
1.检查c盘下host文件访问的域名对应的ip是否正确
先在命令行窗口Ping一下github的地址,就可以获得github官网的IP地址
1 2 3 4 5 6 7 8 9 10 11 12
| E:\Whiper609blog\Whisper609>ping github.com
正在 Ping github.com [140.82.114.4] 具有 32 字节的数据: 来自 140.82.114.4 的回复: 字节=32 时间=267ms TTL=48 来自 140.82.114.4 的回复: 字节=32 时间=255ms TTL=48 来自 140.82.114.4 的回复: 字节=32 时间=247ms TTL=48 来自 140.82.114.4 的回复: 字节=32 时间=262ms TTL=48
140.82.114.4 的 Ping 统计信息: 数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失), 往返行程的估计时间(以毫秒为单位): 最短 = 247ms,最长 = 267ms,平均 = 257ms
|
然后找到这个“C:\Windows\System32\drivers\etc”路径下的hosts文件,
使用记事本打开对比上面ping的ip地址和记录的IP地址是否一致,一致说明IP地址没有错误,再对上传几次,若是没有用再尝试下面的方法。
1 2
| 140.82.114.4 github.com 4 × IPv4 github.global.ssl.fastly.net
|
2.解除ssl限制
打开命令行模式,修改设置,解除ssl验证
1
| git config --global http.sslVerify "false"
|
再上传即可。