前言:
使用fatslane,运行cicd的时候,报错:SSL_connect returned=1 errno=0 peeraddr=17.56.10.18:443 state=error: unexpected eof while reading
截图:
截图理由给出解决方法,但是都不能真正解决的。
解:
实则是使用了mac的 bundler的版本不适配。当你是用命令 bundle update bundler 的时候,会收到报错:“you must use bundler 2 or greater with this lockfile”。这个时候就清楚了。
1. 查看目前的 bundler版本,会发现bundler的版本只是最低的默认版本。
gem list bundler
2. 安装2版本的bundler
sudo gem install bundler
这个时候会收到版本有问题,这里我们只要使用2版本就好
sudo gem install bundler -v 2.4.22
3.效果:
4. (附)换gem源
# 查看目前使用的源、
gem soucres -l
# 删除目前的源
gem sources -remove https://***.com/
# 添加新源
gem sources --add https://mirrors.aliyun.com/rubygems/
或是 https://mirrors.cloud.tencent.com/rubygems/
或是 https://gem.ruby-china.com/