Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Insufficient permissions to the resource in https://pub.dartlang.org package repository

Tags:

flutter

I got this error when I delete flutter-sdk and replace new flutter-sdk

Insufficient permissions to the resource in https://pub.dartlang.org package repository. You can modify credential using:
    pub token add https://pub.dartlang.org
Running "flutter pub get" in flutter_tools...                           
pub get failed (65;     pub token add https://pub.dartlang.org)

flutter version :

Flutter 2.8.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision cf44000065 (6 days ago) • 2021-12-08 14:06:50 -0800
Engine • revision 40a99c5951
Tools • Dart 2.15.0
like image 398
Taleb Avatar asked Mar 21 '26 18:03

Taleb


2 Answers

I had the same issue. You need to use a VPN.

like image 110
Pedram Mohammad Ali pour Avatar answered Mar 23 '26 19:03

Pedram Mohammad Ali pour


First delete credentials:

rm ~/.pub-cache/credentials.json

After you try:

flutter upgrade
flutter pub cache repair
like image 35
EliaTolin Avatar answered Mar 23 '26 19:03

EliaTolin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!