Reputation: 9274
I published a package and logged into the wrong account. I corrected the uploaders by using
flutter packages pub uploader add <correct email>
flutter packages pub uploader remove <incorrect email>
But now when I try to push an update I am unauthorized because I'm still logged in as the incorrect email.
Upvotes: 5
Views: 818
Reputation: 657801
There should be a file
~/.pub-cache/credentials.json
that holds your current authentication info.
If you remove that you should be requested to login again.
Update
A pub logout
command was just added https://github.com/dart-lang/pub/pull/2035
Upvotes: 10
Reputation: 502
If you are using Flutter SDK, the .pub-cache
directory is actually inside the flutter
directory. For my laptop, I have downloaded Flutter into /home/username/flutter
: in order to reset credentials for commands like flutter packages pub publish
, I had to delete /home/username/flutter/.pub-cache
.
Upvotes: 0