Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Got TLS error trying to find package ABC at https://pub.dartlang.org

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:

Got TLS error trying to find package cupertino_icons at https://pub.dartlang.org

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:

Got TLS error trying to find package vector_math at https://pub.dartlang.org

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?

like image 648
Zain SMJ Avatar asked Nov 18 '18 14:11

Zain SMJ


1 Answers

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.

like image 94
Pflugs Avatar answered Nov 15 '22 05:11

Pflugs