简体   繁体   English

对 https://pub.dartlang.org package 存储库中资源的权限不足

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

I got this error when I delete flutter-sdk and replace new flutter-sdk删除flutter-sdk并替换新的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 版本

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

First delete credentials:首先删除凭据:

rm ~/.pub-cache/credentials.json

After you try:尝试后:

flutter upgrade
flutter pub cache repair

I had the same issue.我遇到过同样的问题。 You need to use a VPN.您需要使用 VPN。

I just restart my system and then try to do "flutter pub get" and it works:|我只是重新启动我的系统,然后尝试执行“flutter pub get”并且它可以工作:|

Just flip the country in your VPN to another European country like Netherland to bypass Google LOL, do not set it to Turkiye which is not working as well.只需将您的 VPN 中的国家/地区翻转到另一个欧洲国家(例如荷兰)即可绕过 Google LOL,不要将其设置为无法正常工作的 Turkiye。 (Turkey recently changed its name to Turkiye, dictionaries need to be updated). (土耳其最近更名为Turkiye,字典需要更新)。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 尝试在 https://pub.dartlang.org 上查找包 cupertino_icons 时出现 TLS 错误 - Got TLS error trying to find package cupertino_icons at https://pub.dartlang.org 尝试在 https://pub.dartlang.org 上查找软件包时出现套接字错误 - Got socket error trying to find package at https://pub.dartlang.org 尝试在 https://pub.dartlang.org 上查找包 english_words 时出现套接字错误 - Got socket error trying to find package english_words at https://pub.dartlang.org 尝试在 https://pub.dartlang.org 上查找包 ABC 时出现 TLS 错误 - Got TLS error trying to find package ABC at https://pub.dartlang.org 尝试在 https://pub.dartlang.org 查找 package cupertino_icons 时出现套接字错误 - Got socket error trying to find package cupertino_icons at https://pub.dartlang.org Flutter 创建导致错误尝试在 https://pub.dartlang.org 上查找包 cupertino_icons 时出现 TLS 错误 - Flutter create results in error Got TLS error trying to find package cupertino_icons at https://pub.dartlang.org amplify_flutter 任何不存在的(在 https://pub.dartlang.org 上找不到 package amplify_flutter), - amplify_flutter any which doesn't exist (could not find package amplify_flutter at https://pub.dartlang.org), 创建新的flutter项目时出现此错误错误:无法解析URL“https://pub.dartlang.org” - Getting this error while creating a new flutter project Error : Could not resolve URL "https://pub.dartlang.org" Flutter - 命名参数未根据 pub.dartlang.org 定义,但该包有效 - Flutter - named parameters aren't defined according to pub.dartlang.org, but the package works 等待另一个 flutter 命令释放启动锁; 尝试在 https://pub.dartlang.org 找到 package english_words 时出现套接字错误 - Waiting for another flutter command to release the startup lock ; Got socket error trying to find package english_words at https://pub.dartlang.org
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM