Flutter upgrade升级SDK时报 SSL_ERROR_SYSCALL错误

在进行Flutter升级时,执行如下命令

Flutter upgrade

但是很不幸,由于某些原因,无法访问。报如下错误

Standard error: fatal: unable to access
'https://github.com/flutter/flutter.git/': LibreSSL SSL_connect:
SSL_ERROR_SYSCALL in connection to github.com:443

可以设置走代理,命令如下:

git config --global http.proxy http://127.0.0.1:1080
git config --global https.proxy http://127.0.0.1:1080

需要注意一下端口按自己的配置修改。设置不设置https根据自己需求来。
如果想取消代理设置可以使用如下命令:

git config --global --unset http.proxy 
git config --global --unset https.proxy

设置完成后,测试OK

git config --global命令会在 ~/.gitconfig文件中添加如下配置

[http]
	proxy = http://127.0.0.1:1080
[https]
	proxy = https://127.0.0.1:1080

注:
还有一种使用这个命令的,暂未测试,先保存

git config --global --add remote.origin.proxy

你可能感兴趣的:(Flutter,flutter,ssl,git)