简体   繁体   中英

After switching google cloud projects my python cannot find my new google project's storage bucket?

I created a new project and even though all the IAM permissions are set and local login credentials are correct, I cannot connect to my bucket using python's google storage API (Windows)

I updated the gcloud authentication and it shows I am using the correct login, and even retried uninstalling and reinstalling Google Cloud SDK, but my python can't seem to connect?

The issue has to do with hidden old credentials not being updated in the AppData/Roaming/gcloud. After deleting this folder, uninstalling and reinstalling Google Cloud SDK, it was able to work.

The Application Default Credentials (ADC) are still set.

they can be revoked and new ones be set

gcloud auth application-default revoke
gcloud auth application-default login

More info here: https://cloud.google.com/docs/authentication/provide-credentials-adc

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM