iOS问题集:macos LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443

问题:

1、使用命令 pod install 出现以下问题
2、使用命令 pod repo update --verbose 还是出现以下问题
3、提交代码,也是出现以下问题。。。

Cloning into '/var/folders/cd/z2ln6ndd7r7609zjr31p8slm0000gn/T/d20210317-3846-11fkyiw'... fatal: unable to access 'https://github.com/AFNetworking/AFNetworking.git/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443

我的解决历程
1、尝试了 重新安装 pod(失败
2、尝试了 重新安装 ruby(失败
3、修改 配置文件 ~/.gitconfig 中的网络代理(失败
4、移除 ~/.gitconfig 中的网络代理 proxy(失败
5、电脑关机,重新打开(失败
6、使用“梯子”,科学安全上网(失败

我都想哭,折磨了很长时间,然后「解决方案」是:

要 连续 pod
要 连续 pod
要 连续 pod

或者 链接手机热点,或直接链接网线

原因:就是网络慢,卡一点就掉了,一直pod就好了


另外(别急继续看完):测试以下网络是否能打开https://github.com/CocoaPods/Specs.git
网速测试:
$ ping baidu.com
$ ping raw.githubusercontent.com
$ ping github.com
会出现以下信息:

64 bytes from 13.229.188.59: icmp_seq=0 ttl=43 time=91.183 ms

比较 time 的耗时,time低于30较好,高于 200较差!


还有3种解决方案,配置Hosts:

首先通过 https://www.ipaddress.com/ 查询 https://github.com/ 发现之前的IP地址变了。
然后通过修改为最新的ip解决问题。

方法1

你去官网下载 SwitchHosts,改host是最简单粗暴的
然后添加host配置内容

方法2

前往文件夹
快捷键 shift + command + G 路径 :/private/etc/hosts
修改文件夹,复制副本到桌面,修改完后,替换原来的 hosts 文件即可。「然后添加host配置内容

方法3:

在终端输入命令 networksetup -setv6off Wi-Fi
回车之后,再次提交,瞬间完成。

配置 Hosts 的内容,复制到对应文件中
140.82.113.3 github.com
140.82.114.4 gist.github.com
140.82.114.6 api.github.com
185.199.108.153 assets-cdn.github.com
199.232.96.133 raw.githubusercontent.com
199.232.96.133 gist.githubusercontent.com
199.232.96.133 cloud.githubusercontent.com
199.232.96.133 camo.githubusercontent.com
199.232.96.133 avatars0.githubusercontent.com
199.232.96.133 avatars1.githubusercontent.com
199.232.96.133 avatars2.githubusercontent.com
199.232.96.133 avatars3.githubusercontent.com
199.232.96.133 avatars4.githubusercontent.com
199.232.96.133 avatars5.githubusercontent.com
199.232.96.133 avatars6.githubusercontent.com
199.232.96.133 avatars7.githubusercontent.com
199.232.96.133 avatars8.githubusercontent.com
199.232.96.133 user-images.githubusercontent.com
199.232.96.133 githubusercontent.com

image.png


总结:归根结底 就是网络问题,如果以上方案还解决不了问题,那就等网络好的时候,再执行 git 命令吧,其次就 一直 pod


参考其他几种解决办法:在此查看

你可能感兴趣的:(iOS问题集:macos LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443)