Flutter upgrade [fatal: 无法访问 'https://github.com/...git/'....443]

3,255 阅读1分钟

使用Flutter upgrade升级失败

ProcessException: Process exited abnormally:
fatal: 无法访问 'https://github.com/flutter/flutter.git/':LibreSSL SSL_connect:
SSL_ERROR_SYSCALL in connection to github.com:443
Command: git fetch --tags

该问题报错主要问题是git访问https ssl校验错误。查了些资料有修改代理的,有 设置[http.sslverify=false],有设置curl ssl的...等等都难有成效,可能并不能解决该问题

如果你已配置了github ssh,请看后续,如未配置以下方法将无法生效

方法

  1. 进入到flutter安装目录:如:/usr/local/Cellar/flutter
  2. 执行指令: git config -e 可以看到

image.png 将原来的https方式替换为ssh方式

注意: 建议使用vim直接修改。如果用git remote替换会丢失下面的branch信息,还得补还原branch配置。