Flutter - Token error on publishing package update

212

that because of https://pub.flutter-io.cn, so upload to https://pub.dartlang.org


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

https://pub.flutter-io.cn URI, I think for china so check your pc where from coming.


see this answer


Share:
212
Onalo Joseph
Author by

Onalo Joseph

Updated on January 03, 2023

Comments

  • Onalo Joseph
    Onalo Joseph over 1 year

    I'm trying to update my package on pub.dev, I suddenly start getting this message which i didnt get before

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

    I tried running :

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

    which will be successful. But if i try running the publish command again

    dart pub publish  
    

    I get :

    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
    

    I'm actually stuck here.

    NB: My package repo is public and I've also added it(as token) but didn't work. What am I missing?