解决 composer error:1407742E:SSL 错误

在用 composer 安装 yii2 的过程中报错,内容如下:

code 1. OpenSSL Error messages:
error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
failed to open stream: Cannot connect to HTTPS server through proxy

原因:

由于 Github 18年2月1日 发布通告称 Weak cryptographic standards removal notice

简而言之就是,不在支持 TLSv1/TLSv1.1 因此导致上述错误!

解决办法如下:

使用如下命令检查 TLS 版本

git config http.sslVersion

执行上述操作,命令行中如果什么都没有或者版本不是 tlsv1.2 的话,就执行如下命令:

git config --global http.sslVersion tlsv1.2

一般就可以正常使用了,如果不行,那就请自行 百度、谷歌、必应、哈!

整理自网络

猜你喜欢

转载自blog.csdn.net/weixin_45956258/article/details/103350609
今日推荐