I have no idea what is going on, but essentially this is what happened:
I was working on some gcloud commands, and I impersonated a SA by using:
gcloud auth print-access-token \
--impersonate-service-account sa@blah.com | docker login \
-u oauth2accesstoken \
--password-stdin https://us-east1-docker.pkg.dev
I then pushed a container into artifact registry and nothing went wrong.
Somehow, when I tried to re-run the above command, it told me that:
ERROR: (gcloud.auth.print-access-token) Your current active account [ ] does not have any valid credentials
I think the ONLY valid response is: What the hell is going on? There is no change of ANYTHING (network, VPN, user, whatever). And the only thing I can do is to gcloud auth login again and again. I also used gcloud auth login myaccount@company.com to confirm that I AM using my account.
What can I do? It's already voodoo enough for me.