尝试在https://pub.dartlang.org上找到软件包ABC时遇到TLS错误 [英] Got TLS error trying to find package ABC at https://pub.dartlang.org

查看:156
本文介绍了尝试在https://pub.dartlang.org上找到软件包ABC时遇到TLS错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Linux Ubuntu 18.04.1 LTS .我正在通过git bash或终端或直接从Visual Studio Code创建一个新的 Flutter 项目,但收到一条错误消息:

I am using Linux Ubuntu 18.04.1 LTS. I am creating a new Flutter project through git bash or terminal or from Visual Studio Code directly but gets an error which says:

尝试在以下位置找到软件包cupertino_icons时出现TLS错误: https://pub.dartlang.org

在Flutter Project的pubspec.yaml文件中,我删除了" cupertino_icons:^ 0.1.2 "行以尝试解决此问题,但在另一个软件包上却遇到了相同的错误:

In Flutter Project's pubspec.yaml file I removed the line "cupertino_icons: ^0.1.2" in an attempt to resolve the issue but gets the same error on another package:

尝试在以下位置找到包vector_math时出现TLS错误 https://pub.dartlang.org

我在Google上搜索了很多,但是找不到正确的解决方案.请告诉我这个问题的主要原因以及如何解决?

I've googled alot but couldn't find the right solution. Please do tell me the main cause of this issue and how to solve it?

推荐答案

对于那些通过Google找到解决方法的人,这对我有用.我在公司防火墙(Zscaler)后面运行Windows 10 x64,并且我的客户端使用自签名证书.我最终发现此Github评论,其中描述了创建系统环境变量的指向自签名证书.创建变量并重新启动命令提示符后,便能够执行 flutter pub get 之类的命令.

For those who find their way to this answer via Google, here's what worked for me. I am running Windows 10 x64 behind a corporate firewall (Zscaler), and my client uses a self-signed cert. I eventually found this Github comment which described creating a system environment variable pointing to the self-signed cert. Once I created the variable and restarted my command prompts, I was able to execute commands like flutter pub get.

这篇关于尝试在https://pub.dartlang.org上找到软件包ABC时遇到TLS错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆