Curl Linuxbrew证书颁发

Curl Linuxbrew证书颁发,curl,homebrew,linuxbrew,Curl,Homebrew,Linuxbrew,我安装在我的服务器上。但是,当我尝试运行任何命令时,curl(brew用于获取其更新)会出现问题。 通常,当其他类似的工具出现此类问题时,它们会提供一个标志以使证书的检查无效,curl本身提供了使用-k标志的可能性 但是在brew的文档中,我没有找到这样的标志。因此,我的第二个猜测是将放置在我家中的.curlrc文件中的标志unsecuren设置为默认值,即curl不检查SSL证书 下面是我运行bew时的输出示例: -bash-4.1$ brew update ==> Installing

我安装在我的服务器上。但是,当我尝试运行任何命令时,curl(brew用于获取其更新)会出现问题。 通常,当其他类似的工具出现此类问题时,它们会提供一个标志以使证书的检查无效,
curl
本身提供了使用
-k
标志的可能性

但是在brew的文档中,我没有找到这样的标志。因此,我的第二个猜测是将放置在我家中的
.curlrc
文件中的标志
unsecure
n设置为默认值,即curl不检查SSL证书

下面是我运行bew时的输出示例:

-bash-4.1$ brew update
==> Installing dependencies for curl: patchelf, zlib, binutils, linux-headers, glibc, m4, gmp, mpfr, libmpc, isl@0.18, gcc, pkg-config and openssl
==> Installing curl dependency: patchelf
==> Downloading https://linuxbrew.bintray.com/bottles/patchelf-0.10.x86_64_linux.bottle.tar.gz

curl: (60) Peer certificate cannot be authenticated with known CA certificates
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.
Error: Failed to download resource "patchelf"
Download failed: https://linuxbrew.bintray.com/bottles/patchelf-0.10.x86_64_linux.bottle.tar.gz

为了让Homebrew接受
.curlrc
文件中指定的选项,需要设置一个标志

根据文件:

自制\u CURLRC:如果设置,则调用时自制将不会通过-q curl(1),它禁用curlrc的使用

因此,只需运行此脚本即可使homebrew忽略SSL证书验证:

echo insecure >> ~/.curlrc
HOMEBREW_CURLRC=1
export HOMEBREW_CURLRC
brew install …