安装 Crashlytics (3.14.0) 时出错 - 找不到压缩文件目录
Error while Installing Crashlytics (3.14.0) - cannot find zipfile directory
背景故事
我们刚刚将 macOS 更新到 macOS Catalina,问题就来了;它在旧的 macOS 上运行良好。我们必须手动信任 fabric.io 证书才能进行下载:
Downloading dependencies
Installing Alamofire (4.9.1)
Installing Crashlytics (3.14.0)
[!] Error installing Crashlytics
[!] /usr/bin/curl -f -L -o
/var/folders/l0/whv35ab91t90r2ksnt6v01872000gn/T/d20200102-10389-1do3j4/file.zip
https://kit-downloads.fabric.io/cocoapods/crashlytics/3.14.0/crashlytics.zip
--create-dirs --netrc-optional --retry 2
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:--
--:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 curl: (60) SSL certificate problem: self signed certificate in certificate chain More details here:
https://curl.haxx.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could
not establish a secure connection to it. To learn more about this
situation and how to fix it, please visit the web page mentioned
above.
当前问题
解决证书问题后,出现安装错误。
Downloading dependencies
Installing Alamofire (4.9.1)
Installing Crashlytics (3.14.0)
[!] Error installing Crashlytics
[!] /usr/bin/unzip
/var/folders/l0/whv35ab91t90r2ksnt6v01872000gn/T/d20200106-92577-1do3j4/file.zip
-d /var/folders/l0/whv35ab91t90r2ksnt6v01872000gn/T/d20200106-92577-1do3j4
Archive:
/var/folders/l0/whv35ab91t90r2ksnt6v01872000gn/T/d20200106-92577-1do3j4/file.zip
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile
directory in one of
/var/folders/l0/whv35ab91t90r2ksnt6v01872000gn/T/d20200106-92577-1do3j4/file.zip
or
/var/folders/l0/whv35ab91t90r2ksnt6v01872000gn/T/d20200106-92577-1do3j4/file.zip.zip,
and cannot find
/var/folders/l0/whv35ab91t90r2ksnt6v01872000gn/T/d20200106-92577-1do3j4/file.zip.ZIP,
period.
文件夹不存在,所以我不确定是 curl 出错了还是他们清理了文件夹。知道为什么会发生这种情况以及如何解决它吗?
原来我们的计算机使用的是自签名证书(让事情变得更复杂的是我们使用了代理),并且出现了证书信任错误。转到 Safari 并加载 url,访问该站点,它提示我批准该站点。这会将证书存储到 Keychain Access
中。转到有问题的 Keychain Access
中的证书,获取其信息并将其更改为 Always Trust
。问题已解决。
背景故事
我们刚刚将 macOS 更新到 macOS Catalina,问题就来了;它在旧的 macOS 上运行良好。我们必须手动信任 fabric.io 证书才能进行下载:
Downloading dependencies
Installing Alamofire (4.9.1)
Installing Crashlytics (3.14.0)[!] Error installing Crashlytics
[!] /usr/bin/curl -f -L -o /var/folders/l0/whv35ab91t90r2ksnt6v01872000gn/T/d20200102-10389-1do3j4/file.zip https://kit-downloads.fabric.io/cocoapods/crashlytics/3.14.0/crashlytics.zip --create-dirs --netrc-optional --retry 2% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 curl: (60) SSL certificate problem: self signed certificate in certificate chain More details here: https://curl.haxx.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
当前问题
解决证书问题后,出现安装错误。
Downloading dependencies
Installing Alamofire (4.9.1)
Installing Crashlytics (3.14.0)[!] Error installing Crashlytics
[!] /usr/bin/unzip /var/folders/l0/whv35ab91t90r2ksnt6v01872000gn/T/d20200106-92577-1do3j4/file.zip -d /var/folders/l0/whv35ab91t90r2ksnt6v01872000gn/T/d20200106-92577-1do3j4Archive: /var/folders/l0/whv35ab91t90r2ksnt6v01872000gn/T/d20200106-92577-1do3j4/file.zip End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.unzip: cannot find zipfile directory in one of /var/folders/l0/whv35ab91t90r2ksnt6v01872000gn/T/d20200106-92577-1do3j4/file.zip or
/var/folders/l0/whv35ab91t90r2ksnt6v01872000gn/T/d20200106-92577-1do3j4/file.zip.zip, and cannot find /var/folders/l0/whv35ab91t90r2ksnt6v01872000gn/T/d20200106-92577-1do3j4/file.zip.ZIP, period.
文件夹不存在,所以我不确定是 curl 出错了还是他们清理了文件夹。知道为什么会发生这种情况以及如何解决它吗?
原来我们的计算机使用的是自签名证书(让事情变得更复杂的是我们使用了代理),并且出现了证书信任错误。转到 Safari 并加载 url,访问该站点,它提示我批准该站点。这会将证书存储到 Keychain Access
中。转到有问题的 Keychain Access
中的证书,获取其信息并将其更改为 Always Trust
。问题已解决。