首页 > 其他分享 >cocoapods安装SSL证书问题

cocoapods安装SSL证书问题

时间:2023-06-06 18:47:10浏览次数:38  
标签:certificate 1.11 证书 SSL ERROR cocoapods etc

问题:安装cocoapods 报SSL证书的问题,如下错误

ERROR: SSL verification error at depth 2: self-signed certificate in certificate chain (19)

ERROR: Root certificate is not trusted (/C=GB/ST=Greater Manchester/L=Salford/O=Comodo CA Limited/CN=AAA Certificate Services)

ERROR: SSL verification error at depth 2: self-signed certificate in certificate chain (19)

ERROR: Root certificate is not trusted (/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert Global Root CA)

Successfully installed cocoapods-1.11.2

Parsing documentation for cocoapods-1.11.2

Done installing documentation for cocoapods after 1 seconds

1 gem installed
[!] Couldn't determine repo type for URL: `https://cdn.cocoapods.org/`: SSL_connect returned=1 errno=0 peeraddr=172.67.74.167:443 state=error: certificate verify failed (unable to get local issuer certificate)

解决方案:

1.下载证书

可以使用 wget 下载或者直接在网页下载

https://curl.se/ca/cacert.pem

2.设置环境变量

vim /etc/profile  
# System-wide .profile for sh(1)

if [ -x /usr/libexec/path_helper ]; then
        eval `/usr/libexec/path_helper -s`
fi

if [ "${BASH-no}" != "no" ]; then
        [ -r /etc/bashrc ] && . /etc/bashrc
fi
# 设置环境变量的路径,/root/cacert.pem为下载证书后放的位置
export SSL_CERT_FILE=/root/cacert.pem
source /etc/profile 

3.安装cocoapods,指定版本1.11.2

sudo gem install -n /usr/local/bin cocoapods -v 1.11.2 

注释:使用gem安装问题有点小多,如果不需要指定版本可以选择brew安装最新的版本。终端输入 : brew install cocoapods 即可

标签:certificate,1.11,证书,SSL,ERROR,cocoapods,etc
From: https://www.cnblogs.com/r360/p/17461415.html

相关文章

  • Establishing SSL connection without server's identity verification is not recomm
    WARN:EstablishingSSLconnectionwithoutserver’sidentityverificationisnotrecommended.AccordingtoMySQL5.5.45+,5.6.26+and5.7.6+requirementsSSLconnectionmustbeestablishedbydefaultifexplicitoptionisn’tset.Forcompliancewithexisti......
  • 自己生成泛域名证书,window iis 泛域名证书
    在Windows系统上使用OpenSSL和Certbot生成并打包浏览器认可的SSL证书,你可以按照以下步骤操作:安装OpenSSL:首先,你需要在你的Windows系统上安装OpenSSL。你可以从OpenSSL官方网站下载适合你系统的版本。安装Certbot:然后,你需要安装Certbot。你可以从Certbot......
  • 解决cURL error 60: SSL certificate problem: unable to get local issuer certifica
    转载:报错原因:因为没有配置信任的服务器HTTPS验证。默认情况下,cURL被设为不信任任何CAs,因此浏览器无法通过HTTPs访问你服务器。一、解决方式下载证书1、放到这里来2、修改php.ini文件,去掉前面“;”路径带上""3、openssl这个扩展开启4、记得重启,不然不生效......
  • Git 的SSL certificate problem: unable to get local issuer certificate问题
    D:\temp>gitclonehttps://github.com/xxxxxx/yyyyyy.gitCloninginto'yyyyyy'...fatal:unabletoaccess'https://github.com/xxxxxx/yyyyyy.git/':SSLcertificateproblem:unabletogetlocalissuercertificate处理方法:D:\temp>gitco......
  • openssl编译 windows
    由于需要使用rsa非对称加密开发一个注册机功能,所以需要使用openssl1下载openssl源码,github搜索一下2安装perl3安装nasm并设置为环境变量4使用vsdev命令提示符,加载64位的编译环境5配置openssl6nmake编译7nmaketest7nmakeinstallhttps://github.com/open......
  • 在 PowerShell 中创建测试证书并使用测试证书给程序签名
    在PowerShell中创建测试证书并使用测试证书给程序签名在开发和测试过程中,有时您可能需要创建测试证书并使用它来给程序进行签名。这篇博客将介绍如何在PowerShell中创建测试证书并使用它给程序签名的步骤。步骤1:打开PowerShell在开始菜单中搜索"PowerShell"并管理员......
  • 实验一 密码引擎-1-OpenEuler-OpenSSL编译
    一、任务详情安装Ubuntu和OpenEuler虚拟机下载最新的OpenSSL源码(1.1版本)用自己的8位学号建立一个文件夹,cd你的学号,用pwd获得绝对路径参考https://www.cnblogs.com/rocedu/p/5087623.html先在Ubuntu中完成OpenSSL编译安装,然后在OpenEuler中重现./config--prefix=..(......
  • 实验一 密码引擎-1-OpenEuler-OpenSSL编译
    安装Ubuntu和OpenEuler虚拟机下载最新的OpenSSL源码(1.1版本)用自己的8位学号建立一个文件夹,cd你的学号,用pwd获得绝对路径参考https://www.cnblogs.com/rocedu/p/5087623.html先在Ubuntu中完成OpenSSL编译安装,然后在OpenEuler中重现./config--prefix=..(学号目录的绝对路......
  • OpenSSL-SM2
    任务详情在openEuler(推荐)或Ubuntu或Windows(不推荐)中完成下面任务编译运行 https://github.com/greendow/SM2-signature-creation-and-verification 中的代码,提交运行结果与截图,(7‘)编译运行 https://github.com/greendow/SM2-encrypt-and-decrypt 中的代码提交运行结果......
  • OpenSSL-SM2
    OpenSSL-SM2在openEuler(推荐)或Ubuntu或Windows(不推荐)中完成下面任务编译运行https://github.com/greendow/SM2-signature-creation-and-verification中的代码,提交运行结果与截图,(7‘)编译运行https://github.com/greendow/SM2-encrypt-and-decrypt中的代码提交运行结果与......