curl SSL 认证错误
curl SSL certification error
我一直在尝试在我的 macbook pro 上安装 meteor,但一直面临认证问题。我收到以下错误:
curl: (60) SSL certificate problem: self signed certificate in
certificate chain More details here:
https://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.
使用 curl --insecure https://install.meteor.com | ssh
后,我收到以下错误消息:
Downloading Meteor distribution
curl: (60) SSL certificate problem: unable to get local issuer
certificate More details here: https://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. Installation failed.
(注意安装失败消息)。
请任何人帮助我解决这个问题。
提前致谢。
编辑:
在 运行ning curl install.meteor.com | sh -x
之后,就像 Fedor 要求我 运行 我收到以下消息:
- run_it
- RELEASE=1.2.1
- PREFIX=/usr/local
- set -e
- set -u
- exec
++ uname
- UNAME=Darwin
- '[' Darwin '>' MINGW -a Darwin '<' MINGX ']'
- '[' Darwin '!=' Linux -a Darwin '!=' Darwin ']'
- '[' Darwin = Darwin ']'
++ uname -p
++ sysctl -n hw.cpu64bit_capable
- '[' i386 '!=' i386 -o 1 '!=' 1 ']'
- grep BUNDLE_VERSION /usr/local/bin/meteor
- PLATFORM=os.osx.x86_64
- trap 'echo Installation failed.' EXIT
- '[' -e /Users/usama/.meteor ']'
- TARBALL_URL=https://d3sqy0vbqsdhku.cloudfront.net/packages-bootstrap/1.2.1/meteor-bootstrap-os.osx.x86_64.tar.gz
- INSTALL_TMPDIR=/Users/usama/.meteor-install-tmp
- rm -rf /Users/usama/.meteor-install-tmp
- mkdir /Users/usama/.meteor-install-tmp
- echo 'Downloading Meteor distribution' Downloading Meteor distribution
- curl --progress-bar --fail https://d3sqy0vbqsdhku.cloudfront.net/packages-bootstrap/1.2.1/meteor-bootstrap-os.osx.x86_64.tar.gz
- tar -xzf - -C /Users/usama/.meteor-install-tmp -o
快速回答是:您自己下载的安装脚本调用 curl 来下载 tarball,并且没有 -k 选项:
$ curl -s https://install.meteor.com | grep curl
curl --progress-bar --fail "$TARBALL_URL" | tar -xzf - -C "$INSTALL_TMPDIR" -o
要将 curl 压入其中,您可以将 --insecure 添加到您的 curlrc:
$ echo insecure >> ~/.curlrc
或者只使用 http:
$ curl http://install.meteor.com
但我强烈建议您调查问题本身 - 可能有人对您进行了中间人攻击。 install.meteor.com 的证书对我来说似乎没问题。
我重新安装了 OS,错误结束了。我知道这不应该是解决方案,但这对我有用。我希望其他人发布更好的解决方案。
这就是我解决这个问题的方法。
在网络浏览器中浏览安装脚本。 (https://install.meteor.com/)
将您家中的脚本保存为install_meteor.sh
在终端中,运行 sh install_meteor.sh
如果您运行这样,您会发现错误实际上发生在安装脚本中。您需要做的是编辑脚本,使其忽略证书验证。
vi install_meteor.sh
编辑安装脚本。
查找行 curl --progress-bar --fail "$TARBALL_URL" | tar -xzf - -C "$INSTALL_TMPDIR" -o
将此更改为 curl -k --progress-bar --fail "$TARBALL_URL" | tar -xzf - -C "$INSTALL_TMPDIR" -o
保存并再次运行sh install_meteor.sh
。
我 运行 在 VMbox 运行 Ubuntu 16 上安装并通过 VPN 路由时遇到了这个问题。在浏览器中检查 https://install.meteor.com 后,我遇到的问题是 CA 显示过期以及已经过期的续订日期。
我的 VM 机器的日期延迟了几天(不知道这是怎么发生的)并且时间是由我位于不同县的 VPN 自动设置的.手动设置日期和时间更正了 CA 问题。
注意: 在我的例子中,日期晚了 4 天,但是,即使时间和日期设置是否正确——它仅取决于 CA 何时过期并相对于您的系统 date/time 设置进行更新。您可以在一天后重试 curl
,或者更快的解决方案 — 适当设置您的 date/time 然后重试。
我一直在尝试在我的 macbook pro 上安装 meteor,但一直面临认证问题。我收到以下错误:
curl: (60) SSL certificate problem: self signed certificate in certificate chain More details here: https://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.
使用 curl --insecure https://install.meteor.com | ssh
后,我收到以下错误消息:
Downloading Meteor distribution
curl: (60) SSL certificate problem: unable to get local issuer certificate More details here: https://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. Installation failed.
(注意安装失败消息)。
请任何人帮助我解决这个问题。
提前致谢。 编辑:
在 运行ning curl install.meteor.com | sh -x
之后,就像 Fedor 要求我 运行 我收到以下消息:
- run_it
- RELEASE=1.2.1
- PREFIX=/usr/local
- set -e
- set -u
- exec ++ uname
- UNAME=Darwin
- '[' Darwin '>' MINGW -a Darwin '<' MINGX ']'
- '[' Darwin '!=' Linux -a Darwin '!=' Darwin ']'
- '[' Darwin = Darwin ']' ++ uname -p ++ sysctl -n hw.cpu64bit_capable
- '[' i386 '!=' i386 -o 1 '!=' 1 ']'
- grep BUNDLE_VERSION /usr/local/bin/meteor
- PLATFORM=os.osx.x86_64
- trap 'echo Installation failed.' EXIT
- '[' -e /Users/usama/.meteor ']'
- TARBALL_URL=https://d3sqy0vbqsdhku.cloudfront.net/packages-bootstrap/1.2.1/meteor-bootstrap-os.osx.x86_64.tar.gz
- INSTALL_TMPDIR=/Users/usama/.meteor-install-tmp
- rm -rf /Users/usama/.meteor-install-tmp
- mkdir /Users/usama/.meteor-install-tmp
- echo 'Downloading Meteor distribution' Downloading Meteor distribution
- curl --progress-bar --fail https://d3sqy0vbqsdhku.cloudfront.net/packages-bootstrap/1.2.1/meteor-bootstrap-os.osx.x86_64.tar.gz
- tar -xzf - -C /Users/usama/.meteor-install-tmp -o
快速回答是:您自己下载的安装脚本调用 curl 来下载 tarball,并且没有 -k 选项:
$ curl -s https://install.meteor.com | grep curl
curl --progress-bar --fail "$TARBALL_URL" | tar -xzf - -C "$INSTALL_TMPDIR" -o
要将 curl 压入其中,您可以将 --insecure 添加到您的 curlrc:
$ echo insecure >> ~/.curlrc
或者只使用 http:
$ curl http://install.meteor.com
但我强烈建议您调查问题本身 - 可能有人对您进行了中间人攻击。 install.meteor.com 的证书对我来说似乎没问题。
我重新安装了 OS,错误结束了。我知道这不应该是解决方案,但这对我有用。我希望其他人发布更好的解决方案。
这就是我解决这个问题的方法。
在网络浏览器中浏览安装脚本。 (https://install.meteor.com/)
将您家中的脚本保存为install_meteor.sh
在终端中,运行
sh install_meteor.sh
如果您运行这样,您会发现错误实际上发生在安装脚本中。您需要做的是编辑脚本,使其忽略证书验证。
vi install_meteor.sh
编辑安装脚本。查找行
curl --progress-bar --fail "$TARBALL_URL" | tar -xzf - -C "$INSTALL_TMPDIR" -o
将此更改为
curl -k --progress-bar --fail "$TARBALL_URL" | tar -xzf - -C "$INSTALL_TMPDIR" -o
保存并再次运行
sh install_meteor.sh
。
我 运行 在 VMbox 运行 Ubuntu 16 上安装并通过 VPN 路由时遇到了这个问题。在浏览器中检查 https://install.meteor.com 后,我遇到的问题是 CA 显示过期以及已经过期的续订日期。
我的 VM 机器的日期延迟了几天(不知道这是怎么发生的)并且时间是由我位于不同县的 VPN 自动设置的.手动设置日期和时间更正了 CA 问题。
注意: 在我的例子中,日期晚了 4 天,但是,即使时间和日期设置是否正确——它仅取决于 CA 何时过期并相对于您的系统 date/time 设置进行更新。您可以在一天后重试 curl
,或者更快的解决方案 — 适当设置您的 date/time 然后重试。