$ docker run centos:7.1.1503 curl https://cpanmin.us
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (35) Cannot communicate securely with peer: no common encryption algorithm(s).
我知道我们可以使用直接 URL https://raw.githubusercontent.com/miyagawa/cpanminus/master/cpanm 它工作正常。
我想知道的是此错误的原因是什么以及如何解决它。
下面是 -vvv 选项的输出。
$ docker run centos:7.1.1503 curl -vvvv https://cpanmin.us
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* About to connect() to cpanmin.us port 443 (#0)
* Trying 104.28.29.17...
* Connected to cpanmin.us (104.28.29.17) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* NSS error -12286 (SSL_ERROR_NO_CYPHER_OVERLAP)
* Cannot communicate securely with peer: no common encryption algorithm(s).
* Error in TLS handshake, trying SSLv3...
> GET / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: cpanmin.us
> Accept: */*
>
* Connection died, retrying a fresh connect
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
* Closing connection 0
* Issue another request to this URL: 'https://cpanmin.us'
* About to connect() to cpanmin.us port 443 (#1)
* Trying 104.28.29.17...
* Connected to cpanmin.us (104.28.29.17) port 443 (#1)
* TLS disabled due to previous handshake failure
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* NSS error -12286 (SSL_ERROR_NO_CYPHER_OVERLAP)
* Cannot communicate securely with peer: no common encryption algorithm(s).
* Closing connection 1
curl: (35) Cannot communicate securely with peer: no common encryption algorithm(s).
它适用于我的 curl 版本(不使用 CentOS 7),所以这里的猜测是你正在使用的版本是使用 TLS 库构建的,该库没有支持站点似乎需要的足够新的密码集。