【问题标题】:Flutter - Token error on publishing package updateFlutter - 发布包更新时出现令牌错误
【发布时间】:2022-01-16 11:45:25
【问题描述】:

我正在尝试在 pub.dev 上更新我的包,我突然开始收到这条我以前没有收到的消息

https://pub.flutter-io.cn package repository requested authentication! You can provide credential using:
    pub token add https://pub.flutter-io.cn

我试过跑步:

dart pub token add https://pub.flutter-io.cn

这将是成功的。但是如果我再次尝试运行发布命令

dart pub publish  

我明白了:

Invalid token for https://pub.flutter-io.cn deleted.
https://pub.flutter-io.cn package repository requested authentication! You can provide credential using:
    pub token add https://pub.flutter-io.cn

我真的被困在这里了。

注意:我的包回购是公开的,我也添加了它(作为令牌)但没有工作。我错过了什么?

【问题讨论】:

    标签: flutter dart-pub


    【解决方案1】:

    因为https://pub.flutter-io.cn, 所以上传到https://pub.dartlang.org


     dart pub publish --server=https://pub.dartlang.org
    

    https://pub.flutter-io.cn URI,我想是针对中国的,所以请检查您的电脑来自哪里。


    see this answer


    【讨论】:

      猜你喜欢
      • 2022-11-22
      • 2022-11-24
      • 2018-07-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多