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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值