Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I logout of Dart Pub CLI?

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.

like image 415
Jacob Phillips Avatar asked Jan 03 '23 06:01

Jacob Phillips


1 Answers

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

like image 181
Günter Zöchbauer Avatar answered Jan 27 '23 17:01

Günter Zöchbauer